class AsyncCompressionSource
source · line 13public class AsyncCompressionSource private constructor(private val stream: AsyncCompressionSourceImpl) : AsyncByteSource, AsyncCloseable
- Supertype
AsyncByteSource - Supertype
AsyncCloseable
A suspending compression source adapter with bounded buffering. The ordinary constructor borrows its endpoint; takeOwnership also assumes endpoint close responsibility. I/O waits suspend; codec computation remains local. Cancellation cleanup waits for active operations. Reading to EOF completes format validation; early close does not.
property totals
source · line 34public val totals: CompressionTotals
get: public read-only
The actual input accepted and output delivered so far.
getter get
source · line 34get(): CompressionTotals
function readInto
source · line 43public override suspend fun readInto(buffer: NativeByteBuffer, count: Long): Long
- Overrides
readInto
Produces up to count transformed bytes into the writable buffer region. EOF completes the format; short reads are permitted.
parameter count
source · line 43count: Long
parameter buffer
source · line 43buffer: NativeByteBuffer
function close
source · line 48public override suspend fun close(): Unit
- Overrides
close
Releases codec state and closes an endpoint whose ownership was transferred. It does not force incomplete data to finish.
property failure
source · line 38public val failure: Throwable?
get: public read-only
The retained terminal failure, or None before failure.
getter get
source · line 38get(): Option<Throwable>
constructor constructor
source · line 14constructor(source: AsyncByteSource, options: CompressionOptions = CompressionOptions.Zstd(ZstdOptions()), bufferSize: Long = 8192L)
parameter source
source · line 14source: AsyncByteSource
parameter options
source · line 14options: CompressionOptions = CompressionOptions.Zstd(ZstdOptions())
parameter bufferSize
source · line 15bufferSize: Long = 8192L