Skip to content

Latest commit

 

History

History
83 lines (47 loc) · 1.42 KB

Gzip.md

File metadata and controls

83 lines (47 loc) · 1.42 KB

Class: Gzip

Streaming GZIP compression

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Gzip(opts, cb?)

Creates a GZIP stream

Parameters

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

new Gzip(cb?)

Creates a GZIP stream

Parameters

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

Properties

ondata

ondata: FlateStreamHandler

The handler to call whenever data is available

Methods

flush

flush(): void

Flushes buffered uncompressed data. Useful to immediately retrieve the GZIPped output for small inputs.

Returns

void


push

push(chunk, final?): void

Pushes a chunk to be GZIPped

Parameters

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

Returns

void