fixed dictionary generation

This commit is contained in:
Yann Collet 2016-07-27 14:48:47 +02:00
parent c154d9d6a2
commit 55a8bea0b5
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@ -3,6 +3,7 @@ New : updated compresson format
Improved : better speed on clang and gcc -O2, thanks to Eric Biggers Improved : better speed on clang and gcc -O2, thanks to Eric Biggers
Fixed : legacy mode with ZSTD_HEAPMODE=0, by Christopher Bergqvist 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 : 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 : checksum correctly checked in single-pass mode
Fixed : combined --test amd --rm, reported by Andreas M. Nilsson Fixed : combined --test amd --rm, reported by Andreas M. Nilsson
Modified : minor compression level adaptations Modified : minor compression level adaptations

View 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 */ /* 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]; total=0; for (u=0; u<=offcodeMax; u++) total+=offcodeCount[u];
errorCode = FSE_normalizeCount(offcodeNCount, Offlog, offcodeCount, total, OFFCODE_MAX); errorCode = FSE_normalizeCount(offcodeNCount, Offlog, offcodeCount, total, offcodeMax);
if (FSE_isError(errorCode)) { if (FSE_isError(errorCode)) {
eSize = ERROR(GENERIC); eSize = ERROR(GENERIC);
DISPLAYLEVEL(1, "FSE_normalizeCount error with offcodeCount"); DISPLAYLEVEL(1, "FSE_normalizeCount error with offcodeCount");