From 354b5f1c0a78598ca760acfcb1cd3bb2c18fbae6 Mon Sep 17 00:00:00 2001 From: senhuang42 Date: Mon, 12 Oct 2020 12:20:18 -0400 Subject: [PATCH] Use cycleLog instead of chainLog to determine LDM jobLog --- lib/compress/zstdmt_compress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compress/zstdmt_compress.c b/lib/compress/zstdmt_compress.c index baf6ef4ca..0c9ae69be 100644 --- a/lib/compress/zstdmt_compress.c +++ b/lib/compress/zstdmt_compress.c @@ -1184,8 +1184,8 @@ static unsigned ZSTDMT_computeTargetJobLog(const ZSTD_CCtx_params* params) if (params->ldmParams.enableLdm) { /* In Long Range Mode, the windowLog is typically oversized. * In which case, it's preferable to determine the jobSize - * based on chainLog instead. */ - jobLog = MAX(21, params->cParams.chainLog + 4); + * based on cycleLog instead. */ + jobLog = MAX(21, ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy) + 4); } else { jobLog = MAX(20, params->cParams.windowLog + 2); } -- 2.47.2