Function: gzip()

May 16, 2026 ยท View on GitHub

fflate


Function: gzip()

Call Signature

gzip(data: Uint8Array, opts: AsyncGzipOptions, cb: FlateCallback): AsyncTerminable

Asynchronously compresses data with GZIP

Parameters

data

Uint8Array

The data to compress

opts

AsyncGzipOptions

The compression options

cb

FlateCallback

The function to be called upon compression completion

Returns

AsyncTerminable

A function that can be used to immediately terminate the compression

Call Signature

gzip(data: Uint8Array, cb: FlateCallback): AsyncTerminable

Asynchronously compresses data with GZIP

Parameters

data

Uint8Array

The data to compress

cb

FlateCallback

The function to be called upon compression completion

Returns

AsyncTerminable

A function that can be used to immediately terminate the decompression