create

actual fun StreamingCompressor.Companion.create(algorithm: CompressionAlgorithm, level: CompressionLevel, allocator: BufferAllocator, outputBufferSize: Int): StreamingCompressor

Apple streaming compressor factory using z_stream for true incremental compression.


actual fun StreamingDecompressor.Companion.create(algorithm: CompressionAlgorithm, allocator: BufferAllocator, outputBufferSize: Int, expectedSize: Int): StreamingDecompressor

Apple streaming decompressor factory using z_stream for true incremental decompression.


actual fun SuspendingStreamingCompressor.Companion.create(algorithm: CompressionAlgorithm, level: CompressionLevel, allocator: BufferAllocator): SuspendingStreamingCompressor
actual fun SuspendingStreamingDecompressor.Companion.create(algorithm: CompressionAlgorithm, allocator: BufferAllocator): SuspendingStreamingDecompressor
expect fun StreamingCompressor.Companion.create(algorithm: CompressionAlgorithm = CompressionAlgorithm.Deflate, level: CompressionLevel = CompressionLevel.Default, allocator: BufferAllocator = BufferAllocator.Default, outputBufferSize: Int = 32768): StreamingCompressor

Creates a streaming compressor.

Parameters

algorithm

The compression algorithm to use.

level

The compression level.

allocator

Strategy for allocating output buffers.

outputBufferSize

Size of output buffers (default 32KB).


expect fun StreamingDecompressor.Companion.create(algorithm: CompressionAlgorithm = CompressionAlgorithm.Deflate, allocator: BufferAllocator = BufferAllocator.Default, outputBufferSize: Int = 32768, expectedSize: Int = 0): StreamingDecompressor

Creates a streaming decompressor.

Parameters

algorithm

The compression algorithm to use.

allocator

Strategy for allocating output buffers.

outputBufferSize

Size of output buffers (default 32KB).

expectedSize

Optional hint for expected decompressed size. Used to pre-allocate buffers.


expect fun SuspendingStreamingCompressor.Companion.create(algorithm: CompressionAlgorithm = CompressionAlgorithm.Deflate, level: CompressionLevel = CompressionLevel.Default, allocator: BufferAllocator = BufferAllocator.Default): SuspendingStreamingCompressor

Creates a suspending streaming compressor. Required for browser JavaScript which only supports async CompressionStream.


expect fun SuspendingStreamingDecompressor.Companion.create(algorithm: CompressionAlgorithm = CompressionAlgorithm.Deflate, allocator: BufferAllocator = BufferAllocator.Default): SuspendingStreamingDecompressor

Creates a suspending streaming decompressor.

actual fun StreamingCompressor.Companion.create(algorithm: CompressionAlgorithm, level: CompressionLevel, allocator: BufferAllocator, outputBufferSize: Int): StreamingCompressor

JS streaming compressor factory. Node.js: uses native zlib sync APIs. Browser: throws UnsupportedOperationException (use SuspendingStreamingCompressor instead).


actual fun StreamingDecompressor.Companion.create(algorithm: CompressionAlgorithm, allocator: BufferAllocator, outputBufferSize: Int, expectedSize: Int): StreamingDecompressor

JS streaming decompressor factory. Node.js: uses native zlib sync APIs. Browser: throws UnsupportedOperationException (use SuspendingStreamingDecompressor instead).


actual fun SuspendingStreamingCompressor.Companion.create(algorithm: CompressionAlgorithm, level: CompressionLevel, allocator: BufferAllocator): SuspendingStreamingCompressor

JS suspending streaming compressor factory. Node.js: uses Transform stream API for stateful compression with flush support. Browser: uses native CompressionStream API (no flush support).


actual fun SuspendingStreamingDecompressor.Companion.create(algorithm: CompressionAlgorithm, allocator: BufferAllocator): SuspendingStreamingDecompressor

JS suspending streaming decompressor factory. Node.js: uses Transform stream API for stateful decompression. Browser: uses native DecompressionStream API.