]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed : dictionary compression with new advanced API in Multi-threading mode
authorYann Collet <cyan@fb.com>
Fri, 30 Jun 2017 23:01:02 +0000 (16:01 -0700)
committerYann Collet <cyan@fb.com>
Fri, 30 Jun 2017 23:01:02 +0000 (16:01 -0700)
lib/compress/zstdmt_compress.c

index c96ef48255977b2c33bb8ae99922dcfb52e285a9..38f8af2e7f04a2d23f4bd440e98eaed19e07a51d 100644 (file)
@@ -474,6 +474,7 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
 
     if (nbChunks==1) {   /* fallback to single-thread mode */
         ZSTD_CCtx* const cctx = mtctx->cctxPool->cctx[0];
+        if (cdict) return ZSTD_compress_usingCDict_advanced(cctx, dst, dstCapacity, src, srcSize, cdict, params.fParams);
         return ZSTD_compress_advanced(cctx, dst, dstCapacity, src, srcSize, NULL, 0, params);
     }