Merge pull request #2231 from marxin/use-threads-in-example

Use threads in streaming_compression.c example.
This commit is contained in:
Yann Collet
2020-07-09 08:41:44 -07:00
committed by GitHub
+1
View File
@@ -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.