Use threads in streaming_compression.c example.

Fixes #1584.
dev
Martin Liska 2020-07-08 12:09:00 +02:00
parent 2cdd33ae16
commit 461348c09a
No known key found for this signature in database
GPG Key ID: 4DC182DC0FA73785
1 changed files with 1 additions and 0 deletions

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.