decompress
fun StreamProcessorBuilder.decompress(algorithm: CompressionAlgorithm = CompressionAlgorithm.Gzip, allocator: BufferAllocator = BufferAllocator.FromPool(pool)): StreamProcessorBuilder
Adds decompression to the StreamProcessor pipeline.
Usage:
val processor = StreamProcessor.builder(pool)
.decompress(CompressionAlgorithm.Gzip)
.build()
processor.append(compressedChunk1)
processor.append(compressedChunk2)
val data = processor.readBuffer(processor.available())Content copied to clipboard
Parameters
algorithm
The compression algorithm to decompress (default: Gzip)
allocator
Buffer allocation strategy (default: Direct)
expect fun decompress(buffer: ReadBuffer, algorithm: CompressionAlgorithm = CompressionAlgorithm.Deflate): CompressionResult
Decompresses data from a ReadBuffer using the specified algorithm. Reads from current position to limit.