From: Yann Collet Date: Wed, 27 Jul 2016 12:48:47 +0000 (+0200) Subject: fixed dictionary generation X-Git-Tag: v0.8.0^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55a8bea0b5df2e74dd281db5e08e1aed7f1ff5fd;p=thirdparty%2Fzstd.git fixed dictionary generation --- diff --git a/NEWS b/NEWS index d01a33131..1a329d85c 100644 --- 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 diff --git a/lib/dictBuilder/zdict.c b/lib/dictBuilder/zdict.c index 421fdd436..8713b02e9 100644 --- a/lib/dictBuilder/zdict.c +++ b/lib/dictBuilder/zdict.c @@ -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");