ZSTD_c_nbWorkers constant
Select how many threads will be spawned to compress in parallel.
When nbWorkers >= 1, triggers asynchronous mode when invoking ZSTD_compressStream*() :
ZSTD_compressStream*() consumes input and flush output if possible, but immediately gives back control to caller,
while compression is performed in parallel, within worker thread(s).
(note : a strong exception to this rule is when first invocation of ZSTD_compressStream2() sets ZSTD_e_end :
in which case, ZSTD_compressStream2() delegates to ZSTD_compress2(), which is always a blocking call).
More workers improve speed, but also increase memory usage.
Default value is 0
, aka "single-threaded mode" : no worker is spawned,
compression is performed inside Caller's thread, and all invocations are blocking
Implementation
static const int ZSTD_c_nbWorkers = 400;