Generic Class


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


class InputFilter<D> where D : DataProtocol



init(FilterOperation, using: Algorithm, bufferCapacity: Int, readingFrom: (Int) -> D?)

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

Instance Methods

func readData(ofLength: Int) -> Data?

Reads processed data from the input filter.

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 OutputFilter

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

enum Algorithm

Algorithms used for compression or decompression.

enum FilterError

Errors that occur during compression.

enum FilterOperation

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