mirror of
https://github.com/facebook/zstd.git
synced 2025-10-16 00:04:24 -04:00
It does not feel "right" from a dependency perspective. ZSTD_initDCtx_internal() is triggered once, on DCtx creation, while ZSTD_decompressBegin() is invoked at the beginning of each new frame, and is also a user-facing prototype. Downside : a DCtx must be init before first usage ! This was always the intention by the way, and is documented as such. This stage is automatically done within ZSTD_decompress() and variants, and also within ZSTD_decompressStream(). Only ZSTD_decompressContinue() is impacted, it must be preceded by a ZSTD_decompressBegin(), as detailed in doc. A test has been fixed, to no longer rely on undocumented assumption that ZSTD_decompressBegin() is invoked during init.