Compresses the contents of a source buffer into a destination buffer.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
Pointer to the buffer that receives the compressed data.
Size of the destination buffer in bytes.
Pointer to a buffer containing all of the source data.
Size of the data in the source buffer in bytes.
nil, this parameter is a pointer to a buffer that the function uses for scratch purposes. The size of this buffer must be at least the size returned by a previous call to
_encode _scratch _buffer _size(_:)
scratchis nil, the function creates and manages its own scratch space, but with a possible performance hit.
The number of bytes written to the destination buffer after compressing the input. If the funtion can't compress the entire input to fit into the provided destination buffer, or an error occurs, 0 is returned.
If the input is successfully compressed, the function writes the compressed data to dst_buffer.