zstd_opt: simplified ZSTD_getPrice() and ZSTD_updatePrice() interface

ZSTD_getPrice() and ZSTD_updatePrice() accept normal matchlength as argument
instead of matchlength-MINMATCH,
which makes them easier / more logical to use and read.
Conversion is simply done internally.
This commit is contained in:
Yann Collet
2017-11-08 12:23:27 -08:00
parent bf730e2044
commit 5aa0352742
2 changed files with 26 additions and 25 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ typedef struct {
U32 log2offCodeSum; /* pow2 to compare log2(offreq) to */
U32 factor; /* added to calculate ZSTD_getPrice() (but why?) */
/* end : updated by ZSTD_setLog2Prices */
U32 staticPrices; /* ? do not update statistics ? */
U32 staticPrices; /* prices follow a static cost structure, statistics are irrelevant */
U32 cachedPrice;
U32 cachedLitLength;
const BYTE* cachedLiterals;