From: Martin Liska Date: Wed, 8 Jul 2020 10:09:00 +0000 (+0200) Subject: Use threads in streaming_compression.c example. X-Git-Tag: v1.4.7~123^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=461348c09a3fa08422480d451998f6efb910b8f8;p=thirdparty%2Fzstd.git Use threads in streaming_compression.c example. Fixes #1584. --- diff --git a/examples/streaming_compression.c b/examples/streaming_compression.c index f0f1065b1..045437f28 100644 --- a/examples/streaming_compression.c +++ b/examples/streaming_compression.c @@ -39,6 +39,7 @@ static void compressFile_orDie(const char* fname, const char* outName, int cLeve */ CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, cLevel) ); CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); + ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, 4); /* This loop read from the input file, compresses that entire chunk, * and writes all output produced to the output file.