libz_rs_sys

Function deflateReset

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

This function is equivalent to deflateEnd followed by deflateInit_, but does not free and reallocate the internal compression state.

This function will leave the compression level and any other attributes that may have been set unchanged. The stream’s total_in, total_out, adler, and msg fields are initialized.

§Returns

§Safety

The caller must guarantee that

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