pub unsafe extern "C-unwind" fn inflate(
strm: *mut z_stream,
flush: i32,
) -> i32Expand description
Decompresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.
§Returns
Z_OKif successZ_STREAM_ENDif the end of the compressed data has been reached and all uncompressed output has been producedZ_NEED_DICTif a preset dictionary is needed at this pointZ_STREAM_ERRORif the stream state was inconsistentZ_DATA_ERRORif the input data was corruptedZ_MEM_ERRORif there was not enough memoryZ_BUF_ERRORif no progress was possible or if there was not enough room in the output buffer whenZ_FINISHis used
Note that Z_BUF_ERROR is not fatal, and inflate can be called again with more input and more output space to continue decompressing.
If Z_DATA_ERROR is returned, the application may then call inflateSync to look for a good compression block if a partial recovery of the data is to be attempted.
§Safety
- Either
strmisNULLstrmsatisfies the requirements of&mut *strmand was initialized withinflateInit_or similar
- Either
strm.next_outisNULLstrm.next_outandstrm.avail_outsatisfy the requirements ofcore::slice::from_raw_parts_mut::<MaybeUninit<u8>>
- Either
strm.next_inisNULLstrm.next_inandstrm.avail_insatisfy the requirements ofcore::slice::from_raw_parts::<u8>