Deflater

actual typealias Deflater = java.util.zip.Deflater
actual class Deflater(level: Int, nowrap: Boolean)

Deflate using Kotlin/Native's built-in zlib bindings. This uses the raw deflate format and omits the zlib header and trailer, and does not compute a check value.

Note that you must set flush to Z_FINISH before the last call to process. (It is okay to call process() when the source is exhausted.)

See also, the zlib manual.

expect class Deflater(level: Int, nowrap: Boolean)

Parameters

nowrap

true to skip the ZLIB header and checksum.

Constructors

Link copied to clipboard
actual constructor()
actual constructor(level: Int, nowrap: Boolean)
expect constructor()

Creates a deflater that expects to read a ZLIB header and checksum.

expect constructor(level: Int, nowrap: Boolean)

Properties

Link copied to clipboard
var flush: Int

Probably Z_NO_FLUSH, Z_FINISH, or Z_SYNC_FLUSH.

Functions

Link copied to clipboard
actual fun end()
expect fun end()
Link copied to clipboard
actual fun getBytesRead(): Long
expect fun getBytesRead(): Long