deflateSync

abstract fun deflateSync(buffer: ZlibBuffer, options: ZlibOptions? = null): ZlibBuffer

Method: zlib.deflateSync(buffer, options)

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

Return

The compressed buffer.

Parameters

buffer

The buffer to compress.

options

An optional object containing configuration options for the compression.


open fun deflateSync(buffer: Value?, options: Value? = null): ZlibBuffer

Method: zlib.deflateSync(buffer, options)

Synchronously 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.

Return

The compressed buffer.

Parameters

buffer

The buffer to compress.

options

An optional object containing configuration options for the compression.