1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-29 11:21:22 +03:00

ZSTD_estimateCStreamSize_advanced()

This commit is contained in:
Yann Collet
2017-06-26 16:02:25 -07:00
parent 31af8290d1
commit 0c9a915a28
5 changed files with 21 additions and 9 deletions

View File

@ -193,8 +193,7 @@ static int basicUnitTests(U32 seed, double compressibility)
/* Static CCtx tests */
#define STATIC_CCTX_LEVEL 3
DISPLAYLEVEL(4, "test%3i : create static CCtx for level %u :", testNb++, STATIC_CCTX_LEVEL);
{ ZSTD_compressionParameters const cParams = ZSTD_getCParams(STATIC_CCTX_LEVEL, 0, 0);
size_t const staticCCtxSize = ZSTD_estimateCStreamSize(cParams);
{ size_t const staticCCtxSize = ZSTD_estimateCStreamSize(STATIC_CCTX_LEVEL);
void* const staticCCtxBuffer = malloc(staticCCtxSize);
size_t const staticDCtxSize = ZSTD_estimateDCtxSize();
void* const staticDCtxBuffer = malloc(staticDCtxSize);