Package-level declarations
Types
Compression algorithm types.
Exception thrown when compression/decompression fails.
Compression level.
Result of compression/decompression operations.
Deflate format constants.
Stateful streaming compressor that processes data incrementally. Useful for compressing data that arrives in chunks (e.g., from network).
Stateful streaming decompressor that processes data incrementally.
Suspending streaming compressor for async-only platforms. Browser JavaScript requires this variant since CompressionStream is async.
Suspending streaming decompressor for async-only platforms.
Log2 size of zlib's LZ77 sliding window. Pair with a CompressionAlgorithm to select the format (raw vs zlib vs gzip); this type only carries the size.
Properties
Whether the current platform's StreamingCompressor.create honors a non-default WindowBits argument.
Whether the current platform's StreamingCompressor.create honors a non-default WindowBits argument.
Whether the current platform's StreamingCompressor.create honors a non-default WindowBits argument.
Whether the current platform's StreamingCompressor.create honors a non-default WindowBits argument.
Whether the current platform supports raw deflate (no zlib/gzip headers).
Whether the current platform supports raw deflate (no zlib/gzip headers).
Whether the current platform supports raw deflate (no zlib/gzip headers).
Whether the current platform supports raw deflate (no zlib/gzip headers).
Whether the sync StreamingCompressor maintains compression state across flush() calls.
Whether the sync StreamingCompressor maintains compression state across flush() calls.
Whether the sync StreamingCompressor maintains compression state across flush() calls.
Whether the sync StreamingCompressor maintains compression state across flush() calls.
Whether this platform supports the synchronous compress and decompress functions.
Shared JS/wasmJs compression implementation. Dispatches to Node.js sync APIs or returns browser-unsupported errors.
JVM/Android supports synchronous compression via java.util.zip.
Linux supports synchronous compression via system zlib.
Functions
Compresses data from a ReadBuffer using the specified algorithm. Reads from current position to limit.
Compresses data from a ReadBuffer using the specified algorithm. Reads from current position to limit.
JVM/Android implementation delegating to streaming compression.
Linux implementation using system zlib with direct buffer access.
Compresses data using the specified algorithm. Works on all platforms.
Compresses data using Z_SYNC_FLUSH and strips the sync marker.
Creates a suspending streaming decompressor.
Creates a suspending streaming compressor. Required for browser JavaScript which only supports async CompressionStream.
Creates a streaming decompressor.
Creates a streaming compressor.
Creates a suspending streaming decompressor.
Creates a suspending streaming compressor. Required for browser JavaScript which only supports async CompressionStream.
Creates a streaming decompressor.
Creates a streaming compressor.
Creates a suspending streaming decompressor.
Creates a suspending streaming compressor. Required for browser JavaScript which only supports async CompressionStream.
Linux streaming decompressor factory using z_stream for true incremental decompression.
Linux streaming compressor factory using z_stream for true incremental compression.
Decompresses data from a ReadBuffer using the specified algorithm. Reads from current position to limit.
Decompresses data from a ReadBuffer using the specified algorithm. Reads from current position to limit.
Decompresses data from a ReadBuffer using the specified algorithm. Reads from current position to limit.
Adds decompression to the StreamProcessor pipeline.
Decompresses data using the specified algorithm. Works on all platforms.
Decompresses data that was compressed with compressWithSyncFlush.
Extension function to get buffer from CompressionResult, returning null on failure.
Extension function to get buffer from CompressionResult, throwing on failure.
Strips the Z_SYNC_FLUSH marker (00 00 FF FF) from the end of compressed data.
Convenience function that handles compress, finish, and close automatically. Returns all output chunks (from both compress and finish calls).
Convenience function that handles decompress, finish, and close automatically.
Convenience function that handles compress, finish, and close automatically. All output chunks (from both compress and finish) go to the same callback.
Suspending version of use for use with suspending I/O. Uses the efficient synchronous compressor but allows suspend calls in the block.
Suspending version of use for use with suspending I/O.