#[unsafe(export_name = "inflateCopy")]pub unsafe extern "C-unwind" fn inflateCopy(
dest: *mut z_stream,
source: *const z_stream,
) -> i32Expand description
Sets the destination stream as a complete copy of the source stream.
This function can be useful when randomly accessing a large stream. The first pass through the stream can periodically record the inflate state, allowing restarting inflate at those points when randomly accessing the stream.
§Returns
Z_OKif successZ_MEM_ERRORif there was not enough memoryZ_STREAM_ERRORif the source stream state was inconsistent (such as zalloc being NULL)
The msg field is left unchanged in both source and destination.
§Safety
The caller must guarantee that
- Either
destisNULLdestsatisfies the requirements of&mut *(dest as *mut MaybeUninit<z_stream>)
- Either
sourceisNULLsourcesatisfies the requirements of&mut *strmand was initialized withinflateInit_or similar