class AsyncDecompressionSink
source · line 66public class AsyncDecompressionSink private constructor(private val stream: AsyncCompressionSinkImpl) : AsyncByteSink, AsyncCloseable
- Supertype
AsyncByteSink - Supertype
AsyncCloseable
A suspending decompression sink 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. Call finish for successful completion; close alone does not finish the format.
property failure
source · line 91public val failure: Throwable?
get: public read-only
The retained terminal failure, or None before failure.
getter get
source · line 91get(): Option<Throwable>
function close
source · line 110public 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.
function flush
source · line 100public override suspend fun flush(): Unit
- Overrides
flush
Drains a synchronization point and downstream output without ending input.
constructor constructor
source · line 67constructor(sink: AsyncByteSink, options: DecompressionOptions = DecompressionOptions(), bufferSize: Long = 8192L)
parameter sink
source · line 67sink: AsyncByteSink
parameter options
source · line 67options: DecompressionOptions = DecompressionOptions()
parameter bufferSize
source · line 68bufferSize: Long = 8192L
property totals
source · line 87public val totals: CompressionTotals
get: public read-only
The actual input accepted and output delivered so far.
getter get
source · line 87get(): CompressionTotals
function finish
source · line 105public suspend fun finish(): Unit
Completes the stream and drains final output; decoding also validates that input ended at a complete format boundary.
function writeFrom
source · line 96public override suspend fun writeFrom(buffer: NativeByteBuffer, count: Long): Long
- Overrides
writeFrom
Consumes up to count readable bytes from the input buffer while passing transformed output downstream.
parameter count
source · line 96count: Long
parameter buffer
source · line 96buffer: NativeByteBuffer