pub unsafe extern "C-unwind" fn inflateSync(
strm: *mut z_stream,
) -> i32Expand description
Skips invalid compressed data until
Skip invalid compressed data until a possible full flush point (see the description of deflate with Z_FULL_FLUSH) can be found,
or until all available input is skipped. No output is provided.
inflateSync searches for a 00 00 FF FF pattern in the compressed data.
All full flush points have this pattern, but not all occurrences of this pattern are full flush points.
§Returns
Z_OKif a possible full flush point has been foundZ_BUF_ERRORif no more input was providedZ_DATA_ERRORif no flush point has been foundZ_STREAM_ERRORif the stream structure was inconsistent
In the success case, the application may save the current value of total_in which indicates where valid compressed data was found.
In the error case, the application may repeatedly call inflateSync, providing more input each time, until success or end of the input data.
§Safety
The caller must guarantee that
- Either
strmisNULLstrmsatisfies the requirements of&mut *strmand was initialized withinflateInit_or similar