compression_stream
A structure representing a compression stream.
Declaration
struct compression_streamOverview
The basic workflow for using the stream interface is as follows:
Initialize the state of your compression_stream structure by calling compression_stream_init(_:_:_:) with the
operationparameter set to specify whether you are encoding or decoding, and the chosen algorithm specified by thealgorithmparameter. This allocates storage for the state that allows you to resume encoding or decoding across calls.Set the
dst_buffer,dst_size,src_buffer, andsrc_sizefields of the compression_stream object to point to the next blocks that your code processes.Call compression_stream_process(_:_:). If no further input will be added to the stream via subsequent calls,
flagsshould be COMPRESSION_STREAM_FINALIZE (otherwise 0). If compression_stream_process(_:_:) returns COMPRESSION_STATUS_END, there is no further output from the stream.Repeat steps 2 and 3 as necessary to process the entire stream.
Call compression_stream_destroy(_:) to free the state object in the stream structure.