A structure representing a compression stream.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The basic workflow for using the stream interface is as follows:
Initialize the state of your
compressionstructure by calling
operationparameter set to specify whether you are encoding or decoding, and the chosen algorithm specified by the
algorithmparameter. This allocates storage for the state that allows you to resume encoding or decoding across calls.
srcfields of the
compressionobject to point to the next blocks that your code processes.
compression. If no further input will be added to the stream via subsequent calls,
COMPRESSION(otherwise 0). If
COMPRESSION, there is no further output from the stream.
Repeat steps 2 and 3 as necessary to process the entire stream.
compressionto free the state object in the stream structure.