Streaming GZIP compression
• new Gzip(opts
, cb?
)
Creates a GZIP stream
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
Name | Type | Description |
---|---|---|
cb? |
FlateStreamHandler |
The callback to call whenever data is deflated |
• ondata: FlateStreamHandler
The handler to call whenever data is available
▸ flush(): void
Flushes buffered uncompressed data. Useful to immediately retrieve the GZIPped output for small inputs.
void
▸ push(chunk
, final?
): void
Pushes a chunk to be GZIPped
Name | Type | Description |
---|---|---|
chunk |
Uint8Array |
The chunk to push |
final? |
boolean |
Whether this is the last chunk |
void