Class: AsyncInflate

May 16, 2026 ยท View on GitHub

fflate


Class: AsyncInflate

Asynchronous streaming DEFLATE decompression

Constructors

Constructor

new AsyncInflate(opts: InflateStreamOptions, cb?: AsyncFlateStreamHandler): AsyncInflate

Creates an asynchronous DEFLATE decompression stream

Parameters

opts

InflateStreamOptions

The decompression options

cb?

AsyncFlateStreamHandler

The callback to call whenever data is inflated

Returns

AsyncInflate

Constructor

new AsyncInflate(cb?: AsyncFlateStreamHandler): AsyncInflate

Creates an asynchronous DEFLATE decompression stream

Parameters

cb?

AsyncFlateStreamHandler

The callback to call whenever data is inflated

Returns

AsyncInflate

Properties

ondata

ondata: AsyncFlateStreamHandler

The handler to call whenever data is available


ondrain?

optional ondrain?: AsyncFlateDrainHandler

The handler to call whenever buffered source data is processed (i.e. queuedSize updates)


queuedSize

queuedSize: number

The number of compressed bytes buffered in the stream


terminate

terminate: AsyncTerminable

A method to terminate the stream's internal worker. Subsequent calls to push() will silently fail.

Methods

push()

push(chunk: Uint8Array, final?: boolean): void

Pushes a chunk to be inflated

Parameters

chunk

Uint8Array

The chunk to push

final?

boolean

Whether this is the last chunk

Returns

void