Class

OutputFilter

An encoder-decoder that writes output data to a stream.

Declaration

class OutputFilter

Topics

Initializers

Creates an output filter for compressing or decompressing data.

init(FilterOperation, using: Algorithm, bufferCapacity: Int, writingTo: (Data?) -> Void)

Creates an output filter that can be used to compress or decompress data.

Instance Methods

func write<D>(D?)

Writes data to the output filter.

func finalize()

Finalizes the stream by flushing all the remaining data in the stream.

See Also

Objects that Simplify Multiple-Step Compression

Compressing and Decompressing Data with Input and Output Filters

Compress and decompress streamed or from-memory data, using input and output filters.

Compressing and Decompressing Files with Swift Stream Compression

Perform compression for all files and decompression for files with supported extension types.

class InputFilter

An encoder-decoder that reads input data from a stream.

Beta
enum Algorithm

Algorithms used for compression or decompression.

Beta
enum FilterError

Errors that occur during compression.

Beta
enum FilterOperation

Operations that define whether input and output filters compress or decompress data.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software