Add ldm enable condition in ZSTD_resetCCtx_internal
This commit is contained in:
parent
8c46c1d851
commit
590f7f55f0
@ -1542,6 +1542,12 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
|
|||||||
|
|
||||||
zc->isFirstBlock = 1;
|
zc->isFirstBlock = 1;
|
||||||
|
|
||||||
|
if (params.cParams.strategy >= ZSTD_btopt && params.cParams.windowLog >= 27) {
|
||||||
|
/* Enable LDM by default for optimal parser and window size >= 128MB */
|
||||||
|
DEBUGLOG(4, "LDM enabled by default (window size >= 128MB, strategy >= btopt)");
|
||||||
|
params.ldmParams.enableLdm = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (params.ldmParams.enableLdm) {
|
if (params.ldmParams.enableLdm) {
|
||||||
/* Adjust long distance matching parameters */
|
/* Adjust long distance matching parameters */
|
||||||
ZSTD_ldm_adjustParameters(¶ms.ldmParams, ¶ms.cParams);
|
ZSTD_ldm_adjustParameters(¶ms.ldmParams, ¶ms.cParams);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user