class DeflateMessageEncoder
source · line 9public class DeflateMessageEncoder public constructor(
options: DeflateOptions = DeflateOptions(), contextTakeover: Boolean = true
) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
An RFC 7692 message encoder with explicit message boundaries and context-takeover selection. Finish each message before starting the next.
function flush
source · line 31public fun flush(output: NativeByteBuffer): CompressionStep
Drains a DEFLATE synchronization point without ending the current message.
parameter output
source · line 31output: NativeByteBuffer
constructor constructor
source · line 9constructor(options: DeflateOptions = DeflateOptions(), contextTakeover: Boolean = true)
parameter options
source · line 10options: DeflateOptions = DeflateOptions()
parameter contextTakeover
source · line 10contextTakeover: Boolean = true
function finishMessage
source · line 35public fun finishMessage(output: NativeByteBuffer): CompressionStep
Ends the current message and drains its remaining output; repeat until Finished.
parameter output
source · line 35output: NativeByteBuffer
property totals
source · line 16public val totals: CompressionTotals
get: public read-only
The actual cumulative byte counts accepted and produced by this codec.
getter get
source · line 16get(): CompressionTotals
property failure
source · line 20public val failure: Throwable?
get: public read-only
The recorded terminal failure, or None before failure.
getter get
source · line 20get(): Option<Throwable>
function nextMessage
source · line 40public fun nextMessage(): Unit
Starts the next message after the previous one finished, retaining or resetting history according to context takeover.
function close
source · line 44public override fun close(): Unit
- Overrides
close
Releases native codec state. Closing does not finish incomplete stream or message data.
function process
source · line 26public fun process(input: NativeByteBuffer, output: NativeByteBuffer, count: Long = input.readableBytes): CompressionStep
Processes at most count readable input bytes into the writable output region, advancing both cursors.
parameter input
source · line 26input: NativeByteBuffer
parameter count
source · line 26count: Long = input.readableBytes
parameter output
source · line 26output: NativeByteBuffer