]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
change update rate to 11/10/10/10
authorYann Collet <yann.collet.73@gmail.com>
Wed, 8 Sep 2021 15:58:28 +0000 (08:58 -0700)
committerYann Collet <yann.collet.73@gmail.com>
Wed, 8 Sep 2021 15:58:28 +0000 (08:58 -0700)
better for larger blocks,
very small inefficiency on small block.

lib/compress/zstd_opt.c

index f77d5eb00297db0677deb2f3c969fc786fb749da..9f658bee47cf11e86d028f2ac4e21cf013891803 100644 (file)
@@ -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);