Deprecate advanced streaming functions (#3408)
* deprecate advanced streaming functions * remove internal usage of the deprecated functions * nit * suppress warnings in tests/zstreamtest.c * purge ZSTD_initDStream_usingDict * nits * c90 compat * zstreamtest.c already disables deprecation warnings! * fix initDStream() return value * fix typo * wasn't able to import private symbol properly, this commit works around that * new strategy for zbuff * undo zbuff deprecation warning changes * move ZSTD_DISABLE_DEPRECATE_WARNINGS from .h to .c
This commit is contained in:
@@ -428,8 +428,10 @@ static int BMK_benchMem(z_const void* srcBuffer, size_t srcSize,
|
||||
ZSTD_DStream* zbd = ZSTD_createDStream();
|
||||
size_t rSize;
|
||||
if (zbd == NULL) EXM_THROW(1, "ZSTD_createDStream() allocation failure");
|
||||
rSize = ZSTD_initDStream_usingDict(zbd, dictBuffer, dictBufferSize);
|
||||
if (ZSTD_isError(rSize)) EXM_THROW(1, "ZSTD_initDStream() failed : %s", ZSTD_getErrorName(rSize));
|
||||
rSize = ZSTD_DCtx_reset(zbd, ZSTD_reset_session_only);
|
||||
if (ZSTD_isError(rSize)) EXM_THROW(1, "ZSTD_DCtx_reset() failed : %s", ZSTD_getErrorName(rSize));
|
||||
rSize = ZSTD_DCtx_loadDictionary(zbd, dictBuffer, dictBufferSize);
|
||||
if (ZSTD_isError(rSize)) EXM_THROW(1, "ZSTD_DCtx_loadDictionary() failed : %s", ZSTD_getErrorName(rSize));
|
||||
do {
|
||||
U32 blockNb;
|
||||
for (blockNb=0; blockNb<nbBlocks; blockNb++) {
|
||||
|
||||
Reference in New Issue
Block a user