brotliCompressSync

abstract fun brotliCompressSync(buffer: ZlibBuffer, options: BrotliOptions? = null): ZlibBuffer

Method: zlib.brotliCompressSync(buffer, options)

Synchronously compresses the given buffer using the Brotli 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 brotliCompressSync(buffer: Value?, options: Value? = null): ZlibBuffer

Method: zlib.brotliCompressSync(buffer, options)

Synchronously compresses the given buffer using the Brotli 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.