BMK_both, /* mode */
BMK_TIMETEST_DEFAULT_S, /* nbSeconds */
0, /* blockSize */
+ 0, /* targetCBlockSize */
0, /* nbWorkers */
0, /* realTime */
0, /* additionalParam */
(int)adv->literalCompressionMode));
CHECK_Z(ZSTD_CCtx_setParameter(
ctx, ZSTD_c_strategy, (int)comprParams->strategy));
+ CHECK_Z(ZSTD_CCtx_setParameter(
+ ctx, ZSTD_c_targetCBlockSize, (int)adv->targetCBlockSize));
CHECK_Z(ZSTD_CCtx_loadDictionary(ctx, dictBuffer, dictBufferSize));
}
BMK_mode_t mode; /* 0: all, 1: compress only 2: decode only */
unsigned nbSeconds; /* default timing is in nbSeconds */
size_t blockSize; /* Maximum size of each block*/
+ size_t targetCBlockSize;/* Approximative size of compressed blocks */
int nbWorkers; /* multithreading */
unsigned realTime; /* real time priority */
int additionalParam; /* used by python speed benchmark */
expected. This feature allows for controlling the guess when needed.
Exact guesses result in better compression ratios. Overestimates result in slightly
degraded compression ratios, while underestimates may result in significant degradation.
+* `--target-compressed-block-size=#`:
+ Attempt to produce compressed blocks of approximately this size.
+ This will split larger blocks in order to approach this target.
+ Notably useful to improve latency when the receiver can make use of early data sooner.
* `-o FILE`:
save result into `FILE`.
* `-f`, `--force`:
CLEAN_RETURN(1);
}
benchParams.blockSize = blockSize;
+ benchParams.targetCBlockSize = targetCBlockSize;
benchParams.nbWorkers = (int)nbWorkers;
benchParams.realTime = (unsigned)setRealTimePrio;
benchParams.nbSeconds = bench_nbSeconds;