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:
@@ -706,8 +706,10 @@ ZEXTERN int ZEXPORT z_inflateSetDictionary _Z_OF((z_streamp strm,
|
||||
|
||||
{ ZWRAP_DCtx* const zwd = (ZWRAP_DCtx*) strm->state;
|
||||
if (zwd == NULL || zwd->zbd == NULL) return Z_STREAM_ERROR;
|
||||
{ size_t const initErr = ZSTD_initDStream_usingDict(zwd->zbd, dictionary, dictLength);
|
||||
if (ZSTD_isError(initErr)) return ZWRAPD_finishWithError(zwd, strm, 0); }
|
||||
{ size_t const resetErr = ZSTD_DCtx_reset(zwd->zbd, ZSTD_reset_session_only);
|
||||
if (ZSTD_isError(resetErr)) return ZWRAPD_finishWithError(zwd, strm, 0); }
|
||||
{ size_t const loadErr = ZSTD_DCtx_loadDictionary(zwd->zbd, dictionary, dictLength);
|
||||
if (ZSTD_isError(loadErr)) return ZWRAPD_finishWithError(zwd, strm, 0); }
|
||||
zwd->decompState = ZWRAP_useReset;
|
||||
|
||||
if (zwd->totalInBytes == ZSTD_HEADERSIZE) {
|
||||
|
||||
Reference in New Issue
Block a user