Merge pull request #520 from felixhandte/frame-dict-nits
authorYann Collet <Cyan4973@users.noreply.github.com>
Fri, 27 Apr 2018 20:52:30 +0000 (13:52 -0700)
committerGitHub <noreply@github.com>
Fri, 27 Apr 2018 20:52:30 +0000 (13:52 -0700)
Minor Fixes to Dictionary Preparation in LZ4 Frame

1  2 
lib/lz4frame.c
lib/lz4hc.c

diff --cc 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);
diff --cc lib/lz4hc.c
Simple merge