mirror of
https://github.com/facebook/zstd.git
synced 2025-08-01 09:47:01 +03:00
created ZSTD_compress2() and ZSTD_compressStream2()
ZSTD_compress_generic() is renamed ZSTD_compressStream2(). Note that, for the time being, the "stable" API and advanced one use different parameter planes : setting parameters using the advanced API does not influence ZSTD_compressStream() and using ZSTD_initCStream() does not influence parameters for ZSTD_compressStream2().
This commit is contained in:
@ -85,7 +85,7 @@ static size_t cctxParamRoundTripTest(void* resultBuff, size_t resultBuffCapacity
|
||||
ZSTD_CCtx* const cctx = ZSTD_createCCtx();
|
||||
ZSTD_CCtx_params* const cctxParams = ZSTD_createCCtxParams();
|
||||
ZSTD_inBuffer inBuffer = { srcBuff, srcBuffSize, 0 };
|
||||
ZSTD_outBuffer outBuffer = {compressedBuff, compressedBuffCapacity, 0 };
|
||||
ZSTD_outBuffer outBuffer = { compressedBuff, compressedBuffCapacity, 0 };
|
||||
|
||||
static const int maxClevel = 19;
|
||||
size_t const hashLength = MIN(128, srcBuffSize);
|
||||
@ -101,7 +101,7 @@ static size_t cctxParamRoundTripTest(void* resultBuff, size_t resultBuffCapacity
|
||||
/* Apply parameters */
|
||||
CHECK_Z( ZSTD_CCtx_setParametersUsingCCtxParams(cctx, cctxParams) );
|
||||
|
||||
CHECK_Z (ZSTD_compress_generic(cctx, &outBuffer, &inBuffer, ZSTD_e_end) );
|
||||
CHECK_Z (ZSTD_compressStream2(cctx, &outBuffer, &inBuffer, ZSTD_e_end) );
|
||||
|
||||
ZSTD_freeCCtxParams(cctxParams);
|
||||
ZSTD_freeCCtx(cctx);
|
||||
|
Reference in New Issue
Block a user