From: Yann Collet Date: Wed, 8 Sep 2021 15:58:28 +0000 (-0700) Subject: change update rate to 11/10/10/10 X-Git-Tag: v1.5.1~1^2~112^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef78611c269bc96cf88748cdd0e6d9e5c3ad74b7;p=thirdparty%2Fzstd.git change update rate to 11/10/10/10 better for larger blocks, very small inefficiency on small block. --- diff --git a/lib/compress/zstd_opt.c b/lib/compress/zstd_opt.c index f77d5eb00..9f658bee4 100644 --- a/lib/compress/zstd_opt.c +++ b/lib/compress/zstd_opt.c @@ -228,10 +228,10 @@ ZSTD_rescaleFreqs(optState_t* const optPtr, } else { /* new block : re-use previous statistics, scaled down */ if (compressedLiterals) - optPtr->litSum = ZSTD_scaleStats(optPtr->litFreq, MaxLit, 10); - optPtr->litLengthSum = ZSTD_scaleStats(optPtr->litLengthFreq, MaxLL, 9); - optPtr->matchLengthSum = ZSTD_scaleStats(optPtr->matchLengthFreq, MaxML, 9); - optPtr->offCodeSum = ZSTD_scaleStats(optPtr->offCodeFreq, MaxOff, 9); + optPtr->litSum = ZSTD_scaleStats(optPtr->litFreq, MaxLit, 11); + optPtr->litLengthSum = ZSTD_scaleStats(optPtr->litLengthFreq, MaxLL, 10); + optPtr->matchLengthSum = ZSTD_scaleStats(optPtr->matchLengthFreq, MaxML, 10); + optPtr->offCodeSum = ZSTD_scaleStats(optPtr->offCodeFreq, MaxOff, 10); } ZSTD_setBasePrices(optPtr, optLevel);