gzip

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

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

Asynchronously compresses the given buffer using the gzip 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 gzip(buffer: Value, options: Value? = null, cbk: Value)

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

Asynchronously compresses the given buffer using the gzip 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.