asyncdeflate.md 1.7 KB

Class: AsyncDeflate

Asynchronous streaming DEFLATE compression

Hierarchy

  • AsyncDeflate

Index

Constructors

Properties

Methods

Constructors

constructor

+ new AsyncDeflate(opts: DeflateOptions, cb?: AsyncFlateStreamHandler): AsyncDeflate

Creates an asynchronous DEFLATE stream

Parameters:

Name Type Description
opts DeflateOptions The compression options
cb? AsyncFlateStreamHandler The callback to call whenever data is deflated

Returns: AsyncDeflate

+ new AsyncDeflate(cb?: AsyncFlateStreamHandler): AsyncDeflate

Creates an asynchronous DEFLATE stream

Parameters:

Name Type Description
cb? AsyncFlateStreamHandler The callback to call whenever data is deflated

Returns: AsyncDeflate

Properties

ondata

ondata: AsyncFlateStreamHandler

The handler to call whenever data is available

Methods

push

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

Pushes a chunk to be deflated

Parameters:

Name Type Description
chunk Uint8Array The chunk to push
final? boolean Whether this is the last chunk

Returns: void