deflate

abstract fun deflate(buffer: ZlibBuffer, options: ZlibOptions? = null, cbk: CompressCallback)

Method: zlib.deflate(buffer[, options], callback)

Asynchronously compresses the given buffer using the DEFLATE algorithm; apply the provided options, or use defaults if no options are specified.

Parameters

buffer

The buffer to compress.

options

An optional object containing configuration options for the compression.

cbk

Callback which is passed the resulting buffer.


open fun deflate(buffer: Value, options: Value? = null, cbk: Value)

Method: zlib.deflate(buffer[, options], callback)

Asynchronously compresses the given buffer using the DEFLATE algorithm; apply the provided options, or use defaults if no options are specified.

This method variant works with foreign Value instances.

Parameters

buffer

The buffer to compress.

options

An optional object containing configuration options for the compression.

cbk

Callback which is passed the resulting buffer.