]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed dictionary generation
authorYann Collet <yann.collet.73@gmail.com>
Wed, 27 Jul 2016 12:48:47 +0000 (14:48 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Wed, 27 Jul 2016 12:48:47 +0000 (14:48 +0200)
NEWS
lib/dictBuilder/zdict.c

diff --git a/NEWS b/NEWS
index d01a331314aab6e0447fa75cdf40af50202d057b..1a329d85cefd8cf047dbb10f2a1ac7280897b3f1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ New : updated compresson format
 Improved : better speed on clang and gcc -O2, thanks to Eric Biggers
 Fixed : legacy mode with ZSTD_HEAPMODE=0, by Christopher Bergqvist
 Fixed : premature end of frame when zero-sized raw block, reported by Eric Biggers
+Fixed : statistics for large dictionaries (> 128 KB), reported by Ilona Papava
 Fixed : checksum correctly checked in single-pass mode
 Fixed : combined --test amd --rm, reported by Andreas M. Nilsson
 Modified : minor compression level adaptations
index 421fdd436ce86c5e8221fa53201bcf8eb0ce3c00..8713b02e98cd0cef702b97f45ef75d07de9fc8f8 100644 (file)
@@ -735,8 +735,8 @@ static size_t ZDICT_analyzeEntropy(void*  dstBuffer, size_t maxDstSize,
     }
     /* note : the result of this phase should be used to better appreciate the impact on statistics */
 
-    total=0; for (u=0; u<=OFFCODE_MAX; u++) total+=offcodeCount[u];
-    errorCode = FSE_normalizeCount(offcodeNCount, Offlog, offcodeCount, total, OFFCODE_MAX);
+    total=0; for (u=0; u<=offcodeMax; u++) total+=offcodeCount[u];
+    errorCode = FSE_normalizeCount(offcodeNCount, Offlog, offcodeCount, total, offcodeMax);
     if (FSE_isError(errorCode)) {
         eSize = ERROR(GENERIC);
         DISPLAYLEVEL(1, "FSE_normalizeCount error with offcodeCount");