gzip.md 2.3 KB

Class: Gzip

Streaming GZIP compression Streaming GZIP compression

Hierarchy

  • Gzip

Index

Constructors

Properties

Methods

Constructors

constructor

+ new Gzip(opts: GzipOptions, cb?: FlateStreamHandler): Gzip

Creates a GZIP stream

Parameters:

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

Returns: Gzip

+ new Gzip(cb?: FlateStreamHandler): Gzip

Creates a GZIP stream

Parameters:

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

Returns: Gzip

+ new Gzip(opts: GzipOptions, cb?: FlateStreamHandler): Gzip

Creates a GZIP stream

Parameters:

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

Returns: Gzip

+ new Gzip(cb?: FlateStreamHandler): Gzip

Creates a GZIP stream

Parameters:

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

Returns: Gzip

Properties

ondata

ondata: FlateStreamHandler

The handler to call whenever data is available The handler to call whenever data is available

Methods

push

push(chunk: Uint8Array, final?: boolean): 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