#[export_name = "deflateEnd"]
pub unsafe extern "C-unwind" fn deflateEnd(strm: *mut z_stream) -> i32
Expand description
Deallocates all dynamically allocated data structures for this stream.
This function discards any unprocessed input and does not flush any pending output.
§Returns
Z_OK
if successZ_STREAM_ERROR
if the stream state was inconsistentZ_DATA_ERROR
if the stream was freed prematurely (some input or output was discarded)
In the error case, strm.msg
may be set but then points to a static string (which must not be deallocated).
§Safety
- Either
strm
isNULL
strm
satisfies the requirements of&mut *strm
and was initialized withdeflateInit_
or similar