Function ZSTD_decompressStream

unsafe extern C { unwind: false } fn ZSTD_decompressStream(zds: *mut ZSTD_DStream, output: *mut ZSTD_outBuffer, input: *mut ZSTD_inBuffer) -> usize

ZSTD_decompressStream() : Streaming decompression function. Call repetitively to consume full input updating it as necessary. Function will update both input and output pos fields exposing current state via these fields:

@return : 0 when a frame is completely decoded and fully flushed, or an error code, which can be tested using ZSTD_isError(), or any other value > 0, which means there is some decoding or flushing to do to complete current frame.

Note: when an operation returns with an error code, the @zds state may be left in undefined state. It's UB to invoke ZSTD_decompressStream() on such a state. In order to re-use such a state, it must be first reset, which can be done explicitly (ZSTD_DCtx_reset()), or is implied for operations starting some new decompression job (ZSTD_initDStream, ZSTD_decompressDCtx(), ZSTD_decompress_usingDict())