summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.h
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-12-06 18:11:53 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-12-06 18:11:53 (GMT)
commit2113ead176e0032c7ba04aa93f3bcc3d04ba6142 (patch)
tree54e0befc13d46f52c4ebdfe4b203f1cb1c3df73b /lib/lz4hc.h
parentc1ef7a177fae1f5435f191cbdebb0c59fb81d8ff (diff)
downloadlz4-2113ead176e0032c7ba04aa93f3bcc3d04ba6142.zip
lz4-2113ead176e0032c7ba04aa93f3bcc3d04ba6142.tar.gz
lz4-2113ead176e0032c7ba04aa93f3bcc3d04ba6142.tar.bz2
17-bit LZ4HC_MAXD
Diffstat (limited to 'lib/lz4hc.h')
-rw-r--r--lib/lz4hc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4hc.h b/lib/lz4hc.h
index 40ca401..4882d66 100644
--- a/lib/lz4hc.h
+++ b/lib/lz4hc.h
@@ -131,7 +131,7 @@ LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, in
* Using these definitions makes the code vulnerable to potential API break when upgrading LZ4
**************************************/
#define LZ4HC_DICTIONARY_LOGSIZE 16
-#define LZ4HC_MAXD (1<<LZ4HC_DICTIONARY_LOGSIZE)
+#define LZ4HC_MAXD (1<<(LZ4HC_DICTIONARY_LOGSIZE+1))
#define LZ4HC_MAXD_MASK (LZ4HC_MAXD - 1)
#define LZ4HC_HASH_LOG (LZ4HC_DICTIONARY_LOGSIZE-1)
@@ -176,7 +176,7 @@ typedef struct
#endif
-#define LZ4_STREAMHCSIZE 262200
+#define LZ4_STREAMHCSIZE 4*LZ4HC_HASHTABLESIZE + 2*LZ4HC_MAXD + 52 /* 393268 */
#define LZ4_STREAMHCSIZE_SIZET (LZ4_STREAMHCSIZE / sizeof(size_t))
union LZ4_streamHC_u {
size_t table[LZ4_STREAMHCSIZE_SIZET];