Scoop API

scoop:scoop.compression:0.1.0

AsyncCompressionSink

class AsyncCompressionSink

source · line 13
public
public class AsyncCompressionSink private constructor(private val stream: AsyncCompressionSinkImpl) : AsyncByteSink, AsyncCloseable

A suspending compression 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.

function flush

source · line 47
public
public override suspend fun flush(): Unit

Drains a synchronization point and downstream output without ending input.

function finish

source · line 52
public
public suspend fun finish(): Unit

Completes the stream and drains final output; decoding also validates that input ended at a complete format boundary.

function close

source · line 57
public
public override suspend fun close(): Unit

Releases codec state and closes an endpoint whose ownership was transferred. It does not force incomplete data to finish.