Contents

compressionStream(appendingTo:flags:threadCount:)

Reopens a compression sequential output stream.

Declaration

static func compressionStream(appendingTo compressedStream: ArchiveByteStream, flags: ArchiveFlags = [], threadCount: Int = 0) -> ArchiveByteStream?

Parameters

  • compressedStream:

    The output stream that the function reopens and receives the compressed data.

  • flags:

    Flags that control the behavior of the operation.

  • threadCount:

    The number of worker threads that the operation uses, set to 0 for default.

Return Value

A new archive byte stream.

Discussion

The operation writes compressed data to the end of the supplied archive byte stream, compressedStream. compressedStream must implement seek(toOffset:relativeTo:), and the read and write functions.

The stream that the function returns only implements write(from:) and write(from:atOffset:).

See Also

Compressing Data