diff options
author | Przemyslaw Skibinski <inikep@gmail.com> | 2016-12-07 13:31:46 (GMT) |
---|---|---|
committer | Przemyslaw Skibinski <inikep@gmail.com> | 2016-12-07 13:31:46 (GMT) |
commit | 1289038240ab81aee4cc70ef071da907ccfdfcde (patch) | |
tree | b5c75f8cd677e541c522ad7b53063741d28ec6cc | |
parent | 410ba53dbc5859ab2599d3ba7e65da65f504f95b (diff) | |
download | lz4-1289038240ab81aee4cc70ef071da907ccfdfcde.zip lz4-1289038240ab81aee4cc70ef071da907ccfdfcde.tar.gz lz4-1289038240ab81aee4cc70ef071da907ccfdfcde.tar.bz2 |
15-bit LZ4HC_HASH_LOG
-rw-r--r-- | lib/lz4hc.h | 2 | ||||
-rw-r--r-- | programs/lz4io.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/lz4hc.h b/lib/lz4hc.h index fc8067b..0523314 100644 --- a/lib/lz4hc.h +++ b/lib/lz4hc.h @@ -134,7 +134,7 @@ LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, in #define LZ4HC_MAXD (1<<(LZ4HC_DICTIONARY_LOGSIZE+1)) #define LZ4HC_MAXD_MASK (LZ4HC_MAXD - 1) -#define LZ4HC_HASH_LOG (LZ4HC_DICTIONARY_LOGSIZE+2) +#define LZ4HC_HASH_LOG (LZ4HC_DICTIONARY_LOGSIZE-1) #define LZ4HC_HASHTABLESIZE (1 << LZ4HC_HASH_LOG) #define LZ4HC_HASH_MASK (LZ4HC_HASHTABLESIZE - 1) diff --git a/programs/lz4io.c b/programs/lz4io.c index f8a8f2b..46daaf7 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -591,9 +591,10 @@ int LZ4IO_compressMultipleFilenames(const char** inFileNamesTable, int ifntSize, char* dstFileName = (char*)malloc(FNSPACE); size_t ofnSize = FNSPACE; const size_t suffixSize = strlen(suffix); - cRess_t const ress = LZ4IO_createCResources(); + cRess_t ress; if (dstFileName == NULL) return ifntSize; /* not enough memory */ + ress = LZ4IO_createCResources(); /* loop on each file */ for (i=0; i<ifntSize; i++) { |