From: Yann Collet Date: Fri, 27 Apr 2018 20:52:30 +0000 (-0700) Subject: Merge pull request #520 from felixhandte/frame-dict-nits X-Git-Tag: upstream/1.9.3~8^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e6ca25af3a0906f4b2cd8fd8f9e732bc7ee0eac;p=platform%2Fupstream%2Flz4.git Merge pull request #520 from felixhandte/frame-dict-nits Minor Fixes to Dictionary Preparation in LZ4 Frame --- 1e6ca25af3a0906f4b2cd8fd8f9e732bc7ee0eac diff --cc lib/lz4frame.c index 93ce696,8cf0c2f..6cf2a06 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@@ -610,11 -617,8 +617,11 @@@ size_t LZ4F_compressBegin_usingCDict(LZ cctxPtr->cdict = cdict; if (cctxPtr->prefs.frameInfo.blockMode == LZ4F_blockLinked) { /* frame init only for blockLinked : blockIndependent will be init at each block */ - LZ4F_applyCDict(cctxPtr->lz4CtxPtr, cdict, cctxPtr->prefs.compressionLevel); + LZ4F_initStream(cctxPtr->lz4CtxPtr, cdict, cctxPtr->prefs.compressionLevel); } + if (preferencesPtr->compressionLevel >= LZ4HC_CLEVEL_MIN) { + LZ4_favorDecompressionSpeed((LZ4_streamHC_t*)cctxPtr->lz4CtxPtr, (int)preferencesPtr->favorDecSpeed); + } /* Magic Number */ LZ4F_writeLE32(dstPtr, LZ4F_MAGICNUMBER);