libz_rs_sys

Function inflateReset2

Source
#[export_name = "inflateReset2"]
pub unsafe extern "C-unwind" fn inflateReset2(
    strm: *mut z_stream,
    windowBits: c_int,
) -> i32
Expand description

This function is the same as inflateReset, but it also permits changing the wrap and window size requests.

The windowBits parameter is interpreted the same as it is for inflateInit2_. If the window size is changed, then the memory allocated for the window is freed, and the window will be reallocated by inflate if needed.

§Returns

  • Z_OK if success
  • Z_STREAM_ERROR if the source stream state was inconsistent, or if the windowBits parameter is invalid

§Safety

The caller must guarantee that

  • Either
    • strm is NULL
    • strm satisfies the requirements of &mut *strm and was initialized with inflateInit_ or similar