For Supported Strategies, Attach Dict Even When Params Don't Match
This commit is contained in:
parent
01ff945eae
commit
eae8232f50
@ -1330,8 +1330,10 @@ static int ZSTD_shouldAttachDict(ZSTD_CCtx* cctx,
|
|||||||
&& params.attachDictPref != ZSTD_dictForceCopy
|
&& params.attachDictPref != ZSTD_dictForceCopy
|
||||||
&& !params.forceWindow /* dictMatchState isn't correctly
|
&& !params.forceWindow /* dictMatchState isn't correctly
|
||||||
* handled in _enforceMaxDist */
|
* handled in _enforceMaxDist */
|
||||||
&& ZSTD_equivalentCParams(cctx->appliedParams.cParams,
|
&& ( (cdict->matchState.cParams.strategy <= ZSTD_fast)
|
||||||
cdict->matchState.cParams);
|
|| (cdict->matchState.cParams.strategy > ZSTD_fast &&
|
||||||
|
ZSTD_equivalentCParams(cctx->appliedParams.cParams,
|
||||||
|
cdict->matchState.cParams)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t ZSTD_resetCCtx_byAttachingCDict(ZSTD_CCtx* cctx,
|
static size_t ZSTD_resetCCtx_byAttachingCDict(ZSTD_CCtx* cctx,
|
||||||
|
Loading…
Reference in New Issue
Block a user