From e5728142a2048979f5c0c2149ce71ae952a092e1 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 15 Jan 2008 14:02:22 +0200 Subject: Revised the fastpos code. It now uses the slightly faster table-based version from LZMA SDK 4.57. This should be fast on most systems. A simpler and smaller alternative version is also provided. On some CPUs this can be even a little faster than the default table-based version (see comments in fastpos.h), but on most systems the table-based code is faster. --- src/liblzma/lzma/lzma_encoder_init.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/liblzma/lzma/lzma_encoder_init.c') diff --git a/src/liblzma/lzma/lzma_encoder_init.c b/src/liblzma/lzma/lzma_encoder_init.c index d7807529..dc66977a 100644 --- a/src/liblzma/lzma/lzma_encoder_init.c +++ b/src/liblzma/lzma/lzma_encoder_init.c @@ -21,28 +21,6 @@ #include "lzma_encoder_private.h" -uint8_t lzma_fastpos[1 << 11]; - -extern void -lzma_fastpos_init(void) -{ - static const uint8_t fast_slots = 22; - - int c = 2; - lzma_fastpos[0] = 0; - lzma_fastpos[1] = 1; - - for (uint8_t slot_fast = 2; slot_fast < fast_slots; ++slot_fast) { - const uint32_t k = (1 << ((slot_fast >> 1) - 1)); - - for (uint32_t j = 0; j < k; ++j, ++c) - lzma_fastpos[c] = slot_fast; - } - - return; -} - - /// \brief Initializes the length encoder static void length_encoder_reset(lzma_length_encoder *lencoder, -- cgit v1.2.3