From: senhuang42 Date: Sat, 26 Sep 2020 15:13:39 +0000 (-0400) Subject: Modify codepath to use opt parser exclusively if the compression level is high enough X-Git-Tag: v1.4.7~57^2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35d9f488f5d3dd8918cba5e44d946ce5ce17339d;p=thirdparty%2Fzstd.git Modify codepath to use opt parser exclusively if the compression level is high enough --- diff --git a/lib/compress/zstd_ldm.c b/lib/compress/zstd_ldm.c index dbfce3dce..c68693bd6 100644 --- a/lib/compress/zstd_ldm.c +++ b/lib/compress/zstd_ldm.c @@ -576,6 +576,13 @@ size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore, /* Input positions */ BYTE const* ip = istart; + if (cParams->strategy >= ZSTD_btopt) { + size_t lastLLSize; + ms->ldmSeqStore = *rawSeqStore; /* copy current seqStore */ + lastLLSize = blockCompressor(ms, seqStore, rep, src, srcSize); + return lastLLSize; + } + DEBUGLOG(5, "ZSTD_ldm_blockCompress: srcSize=%zu", srcSize); assert(rawSeqStore->pos <= rawSeqStore->size); assert(rawSeqStore->size <= rawSeqStore->capacity);