mirror of
https://github.com/facebook/zstd
synced 2026-08-22 22:32:07 -04:00
Changed ZSTD_createCDict_advanced()
It now only uses compressionParameters as argument. It produces many changes throughout user code, though hopefully they tend to be simple : just provide the cParams part from existing ZSTD_parameters. Some programs might depend on ZSTD_createCDict_advanced() to pass frame parameters. This change will force them to revisit this strategy and fix it, since frame parameters are effectively silently ignored in current version.
This commit is contained in:
parent
768df129d2
commit
31533bacce
9 changed files with 54 additions and 27 deletions
|
|
@ -236,7 +236,7 @@ static int BMK_benchMem(z_const void* srcBuffer, size_t srcSize,
|
|||
if (compressor == BMK_ZSTD) {
|
||||
ZSTD_parameters const zparams = ZSTD_getParams(cLevel, avgSize, dictBufferSize);
|
||||
ZSTD_customMem const cmem = { NULL, NULL, NULL };
|
||||
ZSTD_CDict* cdict = ZSTD_createCDict_advanced(dictBuffer, dictBufferSize, 1, zparams, cmem);
|
||||
ZSTD_CDict* const cdict = ZSTD_createCDict_advanced(dictBuffer, dictBufferSize, 1, zparams.cParams, cmem);
|
||||
if (cdict==NULL) EXM_THROW(1, "ZSTD_createCDict_advanced() allocation failure");
|
||||
|
||||
do {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue