From: W. Felix Handte Date: Tue, 10 Sep 2019 21:28:52 +0000 (-0400) Subject: Accept `ZSTD_indexResetPolicy_e` Param in `ZSTD_reset_matchState()` X-Git-Tag: v1.4.4~1^2~49^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0492b9a9ecee89d8a53a6e009e1a4ce8136a888f;p=thirdparty%2Fzstd.git Accept `ZSTD_indexResetPolicy_e` Param in `ZSTD_reset_matchState()` --- diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index 9aaa3eec7..2474c9f21 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -1384,6 +1384,7 @@ ZSTD_reset_matchState(ZSTD_matchState_t* ms, ZSTD_cwksp* ws, const ZSTD_compressionParameters* cParams, const ZSTD_compResetPolicy_e crp, + const ZSTD_indexResetPolicy_e forceResetIndex, const ZSTD_resetTarget_e forWho) { size_t const chainSize = (cParams->strategy == ZSTD_fast) ? 0 : ((size_t)1 << cParams->chainLog); @@ -1391,6 +1392,7 @@ ZSTD_reset_matchState(ZSTD_matchState_t* ms, U32 const hashLog3 = ((forWho == ZSTD_resetTarget_CCtx) && cParams->minMatch==3) ? MIN(ZSTD_HASHLOG3_MAX, cParams->windowLog) : 0; size_t const h3Size = ((size_t)1) << hashLog3; + (void)forceResetIndex; ms->hashLog3 = hashLog3; memset(&ms->window, 0, sizeof(ms->window)); @@ -1482,6 +1484,7 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc, ws, ¶ms.cParams, crp, + ZSTDirp_reset, ZSTD_resetTarget_CCtx)); } return ZSTD_continueCCtx(zc, ¶ms, pledgedSrcSize); @@ -1607,7 +1610,9 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc, &zc->blockState.matchState, ws, ¶ms.cParams, - crp, ZSTD_resetTarget_CCtx)); + crp, + ZSTDirp_reset, + ZSTD_resetTarget_CCtx)); /* ldm hash table */ /* initialize bucketOffsets table separately for pointer alignment */ @@ -3156,7 +3161,9 @@ static size_t ZSTD_initCDict_internal( &cdict->matchState, &cdict->workspace, &cParams, - ZSTDcrp_continue, ZSTD_resetTarget_CDict)); + ZSTDcrp_continue, + ZSTDirp_reset, + ZSTD_resetTarget_CDict)); /* (Maybe) load the dictionary * Skips loading the dictionary if it is <= 8 bytes. */