This provides bindings to Gzip/Gunzip, Deflate/Inflate, and DeflateRaw/InflateRaw classes. Each class takes the same options, and is a readable/writable Stream.
Static variables
staticread onlyZ_DEFLATED:Int
The deflate compression method (the only one supported in this version).
Static methods
staticcreateDeflate(?options:Null<ZlibOptions>):Deflate
Returns a new Deflate object with an options.
staticcreateDeflateRaw(?options:Null<ZlibOptions>):DeflateRaw
Returns a new DeflateRaw object with an options.
staticcreateInflate(?options:Null<ZlibOptions>):Inflate
Returns a new Inflate object with an options.
staticcreateInflateRaw(?options:Null<ZlibOptions>):InflateRaw
Returns a new InflateRaw object with an options.
staticdeflate(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticdeflate(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Compress a string with Deflate.
staticdeflateRaw(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticdeflateRaw(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Compress a string with DeflateRaw.
staticdeflateRawSync(buf:EitherType<String, Buffer>, ?options:Null<ZlibOptions>):Buffer
Compress a string with DeflateRaw (synchronous version).
staticdeflateSync(buf:EitherType<String, Buffer>, ?options:Null<ZlibOptions>):Buffer
Compress a string with Deflate (synchronous version).
staticgunzip(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticgunzip(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Decompress a raw Buffer with Gunzip.
staticgunzipSync(buf:EitherType<String, Buffer>, ?options:Null<ZlibOptions>):Buffer
Decompress a raw Buffer with Gunzip (synchronous version).
staticgzip(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticgzip(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Compress a string with Gzip.
staticgzipSync(buf:EitherType<String, Buffer>, ?options:Null<ZlibOptions>):Buffer
Compress a string with Gzip (synchronous version).
staticinflate(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticinflate(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Decompress a raw Buffer with Inflate.
staticinflateRaw(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticinflateRaw(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Decompress a raw Buffer with InflateRaw.
staticinflateRawSync(buf:EitherType<String, Buffer>, ?options:Null<ZlibOptions>):Buffer
Decompress a raw Buffer with InflateRaw (synchronous version).
staticinflateSync(buf:EitherType<String, Buffer>, ?options:Null<ZlibOptions>):Buffer
Decompress a raw Buffer with Inflate (synchronous version).
staticunzip(buf:EitherType<String, Buffer>, callback:(Error, Buffer) ‑> Void):Void
staticunzip(buf:EitherType<String, Buffer>, options:ZlibOptions, callback:(Error, Buffer) ‑> Void):Void
Decompress a raw Buffer with Unzip.
staticunzipSync(buf:EitherType<String, Buffer>, ?options:Null<ZlibOptions>):Buffer
Decompress a raw Buffer with Unzip (synchronous version).