From: Yann Collet Date: Tue, 2 Oct 2018 00:20:12 +0000 (-0700) Subject: Merge pull request #1317 from felixhandte/split-logs X-Git-Tag: v1.3.6^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=228c6e5147f0aad2ada6e35516b71cc4a7e7b0af;p=thirdparty%2Fzstd.git Merge pull request #1317 from felixhandte/split-logs Independent Dictionary and Working Context Table Logs --- 228c6e5147f0aad2ada6e35516b71cc4a7e7b0af diff --cc lib/compress/zstd_compress.c index 5e0fb371c,6efffefba..5f6280a8f --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@@ -2354,10 -2424,12 +2425,13 @@@ static size_t ZSTD_compressBlock_intern dstCapacity, ms->window.dictLimit, ms->nextToUpdate); assert(srcSize <= ZSTD_BLOCKSIZE_MAX); + /* Assert that we have correctly flushed the ctx params into the ms's copy */ + ZSTD_assertEqualCParams(zc->appliedParams.cParams, ms->cParams); + if (srcSize < MIN_CBLOCK_SIZE+ZSTD_blockHeaderSize+1) { ZSTD_ldm_skipSequences(&zc->externSeqStore, srcSize, zc->appliedParams.cParams.searchLength); - return 0; /* don't even attempt compression below a certain srcSize */ + cSize = 0; + goto out; /* don't even attempt compression below a certain srcSize */ } ZSTD_resetSeqStore(&(zc->seqStore)); ms->opt.symbolCosts = &zc->blockState.prevCBlock->entropy; /* required for optimal parser to read stats from dictionary */