node:zlib
Node-compatible synchronous, callback, and streaming zlib compression (node:zlib).
Available in vjs (vjs-lite provides synchronous compression/decompression
and crc32 only; callback and streaming APIs are vjs-only). Enabled by
default unless --no-node-compat is passed.
import ... from "node:zlib"
node-compat (enabled by default; disable with --no-node-compat)vjs). Synchronous *Sync helpers and crc32 run on both vjs and vjs-lite.Example
Section titled “Example”import { gzipSync, gunzipSync } from "node:zlib";
const compressed = gzipSync("hello vaeljs");console.log(gunzipSync(compressed).toString());gzipSyncv0.0.0-alpha.2buf with gzip.gunzipSyncv0.0.0-alpha.2buf.deflateSyncv0.0.0-alpha.2buf with zlib deflate.inflateSyncv0.0.0-alpha.2buf.deflateRawSyncv0.0.0-alpha.2buf with raw deflate (no zlib/gzip header).inflateRawSyncv0.0.0-alpha.2buf.unzipSyncv0.0.0-alpha.2crc32v0.0.0-alpha.2data.gzipvjs onlyv0.0.0-alpha.2buf with gzip and invoke callback.gunzipvjs onlyv0.0.0-alpha.2buf and invoke callback.deflatevjs onlyv0.0.0-alpha.2buf with zlib deflate and invoke callback.inflatevjs onlyv0.0.0-alpha.2buf and invoke callback.deflateRawvjs onlyv0.0.0-alpha.2buf with raw deflate and invoke callback.inflateRawvjs onlyv0.0.0-alpha.2buf and invoke callback.unzipvjs onlyv0.0.0-alpha.2callback.createGzipvjs onlyv0.0.0-alpha.2createGunzipvjs onlyv0.0.0-alpha.2createDeflatevjs onlyv0.0.0-alpha.2createInflatevjs onlyv0.0.0-alpha.2createDeflateRawvjs onlyv0.0.0-alpha.2createInflateRawvjs onlyv0.0.0-alpha.2createUnzipvjs onlyv0.0.0-alpha.2Functions
Section titled “Functions”gzipSync
Section titled “gzipSync”export function gzipSync(buf: InputType, options?: ZlibOptions): Uint8Array;
Synchronously compress buf with gzip.
| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
options optional | ZlibOptions | Optional compression parameters. |
gunzipSync
Section titled “gunzipSync”export function gunzipSync(buf: InputType, options?: ZlibOptions): Uint8Array;
Synchronously decompress gzip data in buf.
| Name | Type | Description |
|---|---|---|
buf | InputType | Gzip-compressed input data. |
options optional | ZlibOptions | Optional decompression parameters. |
deflateSync
Section titled “deflateSync”export function deflateSync(buf: InputType, options?: ZlibOptions): Uint8Array;
Synchronously compress buf with zlib deflate.
| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
options optional | ZlibOptions | Optional compression parameters. |
inflateSync
Section titled “inflateSync”export function inflateSync(buf: InputType, options?: ZlibOptions): Uint8Array;
Synchronously decompress zlib deflate data in buf.
| Name | Type | Description |
|---|---|---|
buf | InputType | Deflate-compressed input data. |
options optional | ZlibOptions | Optional decompression parameters. |
deflateRawSync
Section titled “deflateRawSync”export function deflateRawSync(buf: InputType, options?: ZlibOptions): Uint8Array;
Synchronously compress buf with raw deflate (no zlib/gzip header).
| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
options optional | ZlibOptions | Optional compression parameters. |
inflateRawSync
Section titled “inflateRawSync”export function inflateRawSync(buf: InputType, options?: ZlibOptions): Uint8Array;
Synchronously decompress raw deflate data in buf.
| Name | Type | Description |
|---|---|---|
buf | InputType | Raw-deflate compressed input data. |
options optional | ZlibOptions | Optional decompression parameters. |
unzipSync
Section titled “unzipSync”export function unzipSync(buf: InputType, options?: ZlibOptions): Uint8Array;
Synchronously decompress gzip- or deflate-compressed data (auto-detecting header).
| Name | Type | Description |
|---|---|---|
buf | InputType | Compressed input data. |
options optional | ZlibOptions | Optional decompression parameters. |
export function crc32(data: InputType, value?: number): number;
Compute an unsigned 32-bit CRC-32 checksum over data.
| Name | Type | Description |
|---|---|---|
data | InputType | Input bytes or UTF-8 string. |
value optional | number | Optional initial CRC-32 seed (for incremental updates). |
number — Unsigned 32-bit CRC-32 integer.export function gzip(buf: InputType, callback: CompressCallback): void;
export function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
Asynchronously compress buf with gzip and invoke callback.
gzip(buf, callback)| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
callback | CompressCallback | Callback receiving (err, result). |
voidgzip(buf, options, callback)Asynchronously compress buf with gzip using options and invoke callback.
| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
options | ZlibOptions | Compression options. |
callback | CompressCallback | Callback receiving (err, result). |
voidgunzip
Section titled “gunzip”export function gunzip(buf: InputType, callback: CompressCallback): void;
export function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
Asynchronously decompress gzip data in buf and invoke callback.
gunzip(buf, callback)| Name | Type | Description |
|---|---|---|
buf | InputType | Gzip-compressed input data. |
callback | CompressCallback | Callback receiving (err, result). |
voidgunzip(buf, options, callback)Asynchronously decompress gzip data in buf using options and invoke callback.
| Name | Type | Description |
|---|---|---|
buf | InputType | Gzip-compressed input data. |
options | ZlibOptions | Decompression options. |
callback | CompressCallback | Callback receiving (err, result). |
voiddeflate
Section titled “deflate”export function deflate(buf: InputType, callback: CompressCallback): void;
export function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
Asynchronously compress buf with zlib deflate and invoke callback.
deflate(buf, callback)| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
callback | CompressCallback | Callback receiving (err, result). |
voiddeflate(buf, options, callback)Asynchronously compress buf with zlib deflate using options and invoke callback.
| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
options | ZlibOptions | Compression options. |
callback | CompressCallback | Callback receiving (err, result). |
voidinflate
Section titled “inflate”export function inflate(buf: InputType, callback: CompressCallback): void;
export function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
Asynchronously decompress zlib deflate data in buf and invoke callback.
inflate(buf, callback)| Name | Type | Description |
|---|---|---|
buf | InputType | Deflate-compressed input data. |
callback | CompressCallback | Callback receiving (err, result). |
voidinflate(buf, options, callback)Asynchronously decompress zlib deflate data in buf using options and invoke callback.
| Name | Type | Description |
|---|---|---|
buf | InputType | Deflate-compressed input data. |
options | ZlibOptions | Decompression options. |
callback | CompressCallback | Callback receiving (err, result). |
voiddeflateRaw
Section titled “deflateRaw”export function deflateRaw(buf: InputType, callback: CompressCallback): void;
export function deflateRaw(
buf: InputType,
options: ZlibOptions,
callback: CompressCallback,
): void;
Asynchronously compress buf with raw deflate and invoke callback.
deflateRaw(buf, callback)| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
callback | CompressCallback | Callback receiving (err, result). |
voiddeflateRaw(buf, options, callback)Asynchronously compress buf with raw deflate using options and invoke callback.
| Name | Type | Description |
|---|---|---|
buf | InputType | Input data. |
options | ZlibOptions | Compression options. |
callback | CompressCallback | Callback receiving (err, result). |
voidinflateRaw
Section titled “inflateRaw”export function inflateRaw(buf: InputType, callback: CompressCallback): void;
export function inflateRaw(
buf: InputType,
options: ZlibOptions,
callback: CompressCallback,
): void;
Asynchronously decompress raw deflate data in buf and invoke callback.
inflateRaw(buf, callback)| Name | Type | Description |
|---|---|---|
buf | InputType | Raw-deflate compressed input data. |
callback | CompressCallback | Callback receiving (err, result). |
voidinflateRaw(buf, options, callback)Asynchronously decompress raw deflate data in buf using options and invoke callback.
| Name | Type | Description |
|---|---|---|
buf | InputType | Raw-deflate compressed input data. |
options | ZlibOptions | Decompression options. |
callback | CompressCallback | Callback receiving (err, result). |
voidexport function unzip(buf: InputType, callback: CompressCallback): void;
export function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
Asynchronously decompress gzip- or deflate-compressed data and invoke callback.
unzip(buf, callback)| Name | Type | Description |
|---|---|---|
buf | InputType | Compressed input data. |
callback | CompressCallback | Callback receiving (err, result). |
voidunzip(buf, options, callback)Asynchronously decompress gzip- or deflate-compressed data using options and invoke callback.
| Name | Type | Description |
|---|---|---|
buf | InputType | Compressed input data. |
options | ZlibOptions | Decompression options. |
callback | CompressCallback | Callback receiving (err, result). |
voidcreateGzip
Section titled “createGzip”export function createGzip(options?: ZlibOptions): ZlibStream;
Create a streaming gzip compression transform stream.
| Name | Type | Description |
|---|---|---|
options optional | ZlibOptions | Optional compression options. |
ZlibStream — Gzip ZlibStream transform.createGunzip
Section titled “createGunzip”export function createGunzip(options?: ZlibOptions): ZlibStream;
Create a streaming gzip decompression transform stream.
| Name | Type | Description |
|---|---|---|
options optional | ZlibOptions | Optional decompression options. |
ZlibStream — Gunzip ZlibStream transform.createDeflate
Section titled “createDeflate”export function createDeflate(options?: ZlibOptions): ZlibStream;
Create a streaming zlib deflate compression transform stream.
| Name | Type | Description |
|---|---|---|
options optional | ZlibOptions | Optional compression options. |
ZlibStream — Deflate ZlibStream transform.createInflate
Section titled “createInflate”export function createInflate(options?: ZlibOptions): ZlibStream;
Create a streaming zlib inflate decompression transform stream.
| Name | Type | Description |
|---|---|---|
options optional | ZlibOptions | Optional decompression options. |
ZlibStream — Inflate ZlibStream transform.createDeflateRaw
Section titled “createDeflateRaw”export function createDeflateRaw(options?: ZlibOptions): ZlibStream;
Create a streaming raw deflate compression transform stream.
| Name | Type | Description |
|---|---|---|
options optional | ZlibOptions | Optional compression options. |
ZlibStream — Raw deflate ZlibStream transform.createInflateRaw
Section titled “createInflateRaw”export function createInflateRaw(options?: ZlibOptions): ZlibStream;
Create a streaming raw inflate decompression transform stream.
| Name | Type | Description |
|---|---|---|
options optional | ZlibOptions | Optional decompression options. |
ZlibStream — Raw inflate ZlibStream transform.createUnzip
Section titled “createUnzip”export function createUnzip(options?: ZlibOptions): ZlibStream;
Create a streaming auto-detecting gzip/deflate decompression transform stream.
| Name | Type | Description |
|---|---|---|
options optional | ZlibOptions | Optional decompression options. |
ZlibStream — Unzip ZlibStream transform.Interfaces
Section titled “Interfaces”ZlibOptions
Section titled “ZlibOptions”export interface ZlibOptions {
flush?: number;
finishFlush?: number;
chunkSize?: number;
windowBits?: number;
level?: number;
memLevel?: number;
strategy?: number;
dictionary?: ArrayBufferView | ArrayBuffer;
info?: boolean;
maxOutputLength?: number;
}
Compression and decompression options accepted by node:zlib functions.
| Property | Type | Description | Since |
|---|---|---|---|
flush optional | number | Flush mode constant (Z_NO_FLUSH, Z_SYNC_FLUSH, etc.). | v0.0.0-alpha.2 |
finishFlush optional | number | Final flush mode constant (Z_FINISH). | v0.0.0-alpha.2 |
chunkSize optional | number | Internal stream chunk size in bytes. | v0.0.0-alpha.2 |
windowBits optional | number | Base-2 logarithm of the LZ77 history buffer size (8..=15 or negative for raw). | v0.0.0-alpha.2 |
level optional | number | Compression level (-1 or 0..=9). | v0.0.0-alpha.2 |
memLevel optional | number | Memory usage level (1..=9). | v0.0.0-alpha.2 |
strategy optional | number | Compression strategy constant. | v0.0.0-alpha.2 |
dictionary optional | ArrayBufferView | ArrayBuffer | Preset compression dictionary bytes. | v0.0.0-alpha.2 |
info optional | boolean | Return { buffer, engine } metadata when true on sync calls. | v0.0.0-alpha.2 |
maxOutputLength optional | number | Maximum decompressed output bytes allowed (protects against zip bombs). | v0.0.0-alpha.2 |
ZlibStream
Section titled “ZlibStream”export interface ZlibStream {
readonly bytesWritten: number;
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
pipe<T extends { write(chunk: any, ...args: any[]): any; end(...args: any[]): any }>(
destination: T,
options?: { end?: boolean },
): T;
write(chunk: InputType, callback?: (error?: Error | null) => void): boolean;
write(chunk: string, encoding: string, callback?: (error?: Error | null) => void): boolean;
end(callback?: () => void): this;
end(chunk: InputType, callback?: () => void): this;
flush(kind?: number | (() => void), callback?: () => void): void;
close(callback?: () => void): void;
destroy(error?: Error): this;
}
Streaming transform interface returned by createGzip, createGunzip, and siblings.
| Property | Type | Description | Since |
|---|---|---|---|
bytesWritten readonly | number | Number of bytes written to the underlying zlib engine. | v0.0.0-alpha.2 |
ZlibStream.on
Section titled “ZlibStream.on”on(eventName: string | symbol, listener: (...args: any[]) => void): this;
Register a stream event listener.
| Name | Type | Description |
|---|---|---|
eventName | string | symbol | — |
listener | (...args: any[]) => void | — |
thisZlibStream.once
Section titled “ZlibStream.once”once(eventName: string | symbol, listener: (...args: any[]) => void): this;
Register a one-time stream event listener.
| Name | Type | Description |
|---|---|---|
eventName | string | symbol | — |
listener | (...args: any[]) => void | — |
thisZlibStream.off
Section titled “ZlibStream.off”off(eventName: string | symbol, listener: (...args: any[]) => void): this;
Remove a stream event listener.
| Name | Type | Description |
|---|---|---|
eventName | string | symbol | — |
listener | (...args: any[]) => void | — |
thisZlibStream.pipe
Section titled “ZlibStream.pipe”pipe<T extends { write(chunk: any, ...args: any[]): any; end(...args: any[]): any }>(
destination: T,
options?: { end?: boolean },
): T;
Pipe compressed/decompressed output into destination.
| Name | Type | Description |
|---|---|---|
destination | T | — |
options optional | { end?: boolean } | — |
TZlibStream.write
Section titled “ZlibStream.write”write(chunk: InputType, callback?: (error?: Error | null) => void): boolean;
write(chunk: string, encoding: string, callback?: (error?: Error | null) => void): boolean;
Write input chunk to the compression stream.
write(chunk, callback?)| Name | Type | Description |
|---|---|---|
chunk | InputType | — |
callback optional | (error?: Error | null) => void | — |
booleanwrite(chunk, encoding, callback?)Write input chunk with encoding to the compression stream.
| Name | Type | Description |
|---|---|---|
chunk | string | — |
encoding | string | — |
callback optional | (error?: Error | null) => void | — |
booleanZlibStream.end
Section titled “ZlibStream.end”end(callback?: () => void): this;
end(chunk: InputType, callback?: () => void): this;
Finish writing to the stream.
end(callback?)| Name | Type | Description |
|---|---|---|
callback optional | () => void | — |
thisend(chunk, callback?)Write final chunk and finish the stream.
| Name | Type | Description |
|---|---|---|
chunk | InputType | — |
callback optional | () => void | — |
thisZlibStream.flush
Section titled “ZlibStream.flush”flush(kind?: number | (() => void), callback?: () => void): void;
Flush pending output from the zlib stream.
| Name | Type | Description |
|---|---|---|
kind optional | number | (() => void) | — |
callback optional | () => void | — |
voidZlibStream.close
Section titled “ZlibStream.close”close(callback?: () => void): void;
Close and release the underlying zlib state.
| Name | Type | Description |
|---|---|---|
callback optional | () => void | — |
voidZlibStream.destroy
Section titled “ZlibStream.destroy”destroy(error?: Error): this;
Destroy the stream.
| Name | Type | Description |
|---|---|---|
error optional | Error | — |
thisZlibConstants
Section titled “ZlibConstants”export interface ZlibConstants {
readonly Z_NO_FLUSH: number;
readonly Z_PARTIAL_FLUSH: number;
readonly Z_SYNC_FLUSH: number;
readonly Z_FULL_FLUSH: number;
readonly Z_FINISH: number;
readonly Z_BLOCK: number;
readonly Z_OK: number;
readonly Z_STREAM_END: number;
readonly Z_NEED_DICT: number;
readonly Z_ERRNO: number;
readonly Z_STREAM_ERROR: number;
readonly Z_DATA_ERROR: number;
readonly Z_MEM_ERROR: number;
readonly Z_BUF_ERROR: number;
readonly Z_VERSION_ERROR: number;
readonly Z_NO_COMPRESSION: number;
readonly Z_BEST_SPEED: number;
readonly Z_BEST_COMPRESSION: number;
readonly Z_DEFAULT_COMPRESSION: number;
readonly Z_FILTERED: number;
readonly Z_HUFFMAN_ONLY: number;
readonly Z_RLE: number;
readonly Z_FIXED: number;
readonly Z_DEFAULT_STRATEGY: number;
readonly Z_DEFAULT_WINDOWBITS: number;
readonly Z_MIN_WINDOWBITS: number;
readonly Z_MAX_WINDOWBITS: number;
readonly Z_DEFAULT_CHUNK: number;
readonly Z_MIN_CHUNK: number;
readonly Z_MAX_CHUNK: number;
readonly Z_DEFAULT_MEMLEVEL: number;
readonly Z_MIN_MEMLEVEL: number;
readonly Z_MAX_MEMLEVEL: number;
readonly Z_DEFAULT_LEVEL: number;
readonly Z_MIN_LEVEL: number;
readonly Z_MAX_LEVEL: number;
}
Numeric constants exposed on zlib.constants.
| Property | Type | Description | Since |
|---|---|---|---|
Z_NO_FLUSH readonly | number | No flush (0). | v0.0.0-alpha.2 |
Z_PARTIAL_FLUSH readonly | number | Partial flush (1). | v0.0.0-alpha.2 |
Z_SYNC_FLUSH readonly | number | Sync flush (2). | v0.0.0-alpha.2 |
Z_FULL_FLUSH readonly | number | Full flush (3). | v0.0.0-alpha.2 |
Z_FINISH readonly | number | Finish flush (4). | v0.0.0-alpha.2 |
Z_BLOCK readonly | number | Block flush (5). | v0.0.0-alpha.2 |
Z_OK readonly | number | Success status (0). | v0.0.0-alpha.2 |
Z_STREAM_END readonly | number | Stream end status (1). | v0.0.0-alpha.2 |
Z_NEED_DICT readonly | number | Preset dictionary needed (2). | v0.0.0-alpha.2 |
Z_ERRNO readonly | number | System error status (-1). | v0.0.0-alpha.2 |
Z_STREAM_ERROR readonly | number | Stream error status (-2). | v0.0.0-alpha.2 |
Z_DATA_ERROR readonly | number | Data error status (-3). | v0.0.0-alpha.2 |
Z_MEM_ERROR readonly | number | Memory error status (-4). | v0.0.0-alpha.2 |
Z_BUF_ERROR readonly | number | Buffer error status (-5). | v0.0.0-alpha.2 |
Z_VERSION_ERROR readonly | number | Version mismatch status (-6). | v0.0.0-alpha.2 |
Z_NO_COMPRESSION readonly | number | Compression level 0 (no compression). | v0.0.0-alpha.2 |
Z_BEST_SPEED readonly | number | Compression level 1 (fastest). | v0.0.0-alpha.2 |
Z_BEST_COMPRESSION readonly | number | Compression level 9 (best ratio). | v0.0.0-alpha.2 |
Z_DEFAULT_COMPRESSION readonly | number | Default compression level (-1). | v0.0.0-alpha.2 |
Z_FILTERED readonly | number | Filtered strategy (1). | v0.0.0-alpha.2 |
Z_HUFFMAN_ONLY readonly | number | Huffman-only strategy (2). | v0.0.0-alpha.2 |
Z_RLE readonly | number | Run-length encoding strategy (3). | v0.0.0-alpha.2 |
Z_FIXED readonly | number | Fixed Huffman strategy (4). | v0.0.0-alpha.2 |
Z_DEFAULT_STRATEGY readonly | number | Default compression strategy (0). | v0.0.0-alpha.2 |
Z_DEFAULT_WINDOWBITS readonly | number | Default windowBits (15). | v0.0.0-alpha.2 |
Z_MIN_WINDOWBITS readonly | number | Minimum windowBits (8). | v0.0.0-alpha.2 |
Z_MAX_WINDOWBITS readonly | number | Maximum windowBits (15). | v0.0.0-alpha.2 |
Z_DEFAULT_CHUNK readonly | number | Default chunk size (16384). | v0.0.0-alpha.2 |
Z_MIN_CHUNK readonly | number | Minimum chunk size (64). | v0.0.0-alpha.2 |
Z_MAX_CHUNK readonly | number | Maximum chunk size (Infinity). | v0.0.0-alpha.2 |
Z_DEFAULT_MEMLEVEL readonly | number | Default memory level (8). | v0.0.0-alpha.2 |
Z_MIN_MEMLEVEL readonly | number | Minimum memory level (1). | v0.0.0-alpha.2 |
Z_MAX_MEMLEVEL readonly | number | Maximum memory level (9). | v0.0.0-alpha.2 |
Z_DEFAULT_LEVEL readonly | number | Default compression level (-1). | v0.0.0-alpha.2 |
Z_MIN_LEVEL readonly | number | Minimum compression level (-1). | v0.0.0-alpha.2 |
Z_MAX_LEVEL readonly | number | Maximum compression level (9). | v0.0.0-alpha.2 |
Type Aliases
Section titled “Type Aliases”InputType
Section titled “InputType”export type InputType = string | ArrayBufferView | ArrayBuffer;
Binary or UTF-8 string input accepted by node:zlib functions.
CompressCallback
Section titled “CompressCallback”export type CompressCallback = (error: Error | null, result: Uint8Array) => void;
Callback signature for asynchronous node:zlib functions.
Constants
Section titled “Constants”constants
Section titled “constants”export const constants: ZlibConstants;
Zlib numeric constants.
export const codes: Readonly<Record<string, number | string>>;
Bidirectional zlib status code map (Z_OK -> 0, "0" -> "Z_OK", etc.).
Default Export
Section titled “Default Export”default export
Section titled “default export”const _default: {
/** Synchronously gzip-compress data. @since 0.0.0-alpha.2 */
gzipSync: typeof gzipSync;
/** Synchronously gzip-decompress data. @since 0.0.0-alpha.2 */
gunzipSync: typeof gunzipSync;
/** Synchronously deflate-compress data. @since 0.0.0-alpha.2 */
deflateSync: typeof deflateSync;
/** Synchronously deflate-decompress data. @since 0.0.0-alpha.2 */
inflateSync: typeof inflateSync;
/** Synchronously raw-deflate-compress data. @since 0.0.0-alpha.2 */
deflateRawSync: typeof deflateRawSync;
/** Synchronously raw-deflate-decompress data. @since 0.0.0-alpha.2 */
inflateRawSync: typeof inflateRawSync;
/** Synchronously auto-decompress gzip or deflate data. @since 0.0.0-alpha.2 */
unzipSync: typeof unzipSync;
/** Compute CRC-32 checksum. @since 0.0.0-alpha.2 */
crc32: typeof crc32;
/** Asynchronously gzip-compress data. @since 0.0.0-alpha.2 */
gzip: typeof gzip;
/** Asynchronously gzip-decompress data. @since 0.0.0-alpha.2 */
gunzip: typeof gunzip;
/** Asynchronously deflate-compress data. @since 0.0.0-alpha.2 */
deflate: typeof deflate;
/** Asynchronously deflate-decompress data. @since 0.0.0-alpha.2 */
inflate: typeof inflate;
/** Asynchronously raw-deflate-compress data. @since 0.0.0-alpha.2 */
deflateRaw: typeof deflateRaw;
/** Asynchronously raw-deflate-decompress data. @since 0.0.0-alpha.2 */
inflateRaw: typeof inflateRaw;
/** Asynchronously auto-decompress gzip or deflate data. @since 0.0.0-alpha.2 */
unzip: typeof unzip;
/** Create a gzip transform stream. @since 0.0.0-alpha.2 */
createGzip: typeof createGzip;
/** Create a gunzip transform stream. @since 0.0.0-alpha.2 */
createGunzip: typeof createGunzip;
/** Create a deflate transform stream. @since 0.0.0-alpha.2 */
createDeflate: typeof createDeflate;
/** Create an inflate transform stream. @since 0.0.0-alpha.2 */
createInflate: typeof createInflate;
/** Create a raw deflate transform stream. @since 0.0.0-alpha.2 */
createDeflateRaw: typeof createDeflateRaw;
/** Create a raw inflate transform stream. @since 0.0.0-alpha.2 */
createInflateRaw: typeof createInflateRaw;
/** Create an unzip transform stream. @since 0.0.0-alpha.2 */
createUnzip: typeof createUnzip;
/** Zlib numeric constants. @since 0.0.0-alpha.2 */
readonly constants: ZlibConstants;
/** Bidirectional zlib status code map. @since 0.0.0-alpha.2 */
readonly codes: Readonly<Record<string, number | string>>;
};
export default _default;
gzip, gunzip, deflate, inflate, deflateRaw, inflateRaw, unzip, createGzip, createGunzip, createDeflate, createInflate, createDeflateRaw, createInflateRaw, createUnzip are available in vjs (V8) only and omitted from the default export in vjs-lite.Default export object providing all node:zlib functions, stream factories, and constants.
