Browse Source

doc: add `added:` information for zlib

Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6840
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
v6.x
Anna Henningsen 9 years ago
committed by Rod Vagg
parent
commit
527a8a4844
  1. 102
      doc/api/zlib.md

102
doc/api/zlib.md

@ -215,6 +215,9 @@ http.createServer((request, response) => {
``` ```
## Constants ## Constants
<!-- YAML
added: v0.5.8
-->
<!--type=misc--> <!--type=misc-->
@ -279,6 +282,9 @@ For initializing zalloc, zfree, opaque.
* `zlib.Z_NULL` * `zlib.Z_NULL`
## Class Options ## Class Options
<!-- YAML
added: v0.11.1
-->
<!--type=misc--> <!--type=misc-->
@ -300,40 +306,67 @@ See the description of `deflateInit2` and `inflateInit2` at
<http://zlib.net/manual.html#Advanced> for more information on these. <http://zlib.net/manual.html#Advanced> for more information on these.
## Class: zlib.Deflate ## Class: zlib.Deflate
<!-- YAML
added: v0.5.8
-->
Compress data using deflate. Compress data using deflate.
## Class: zlib.DeflateRaw ## Class: zlib.DeflateRaw
<!-- YAML
added: v0.5.8
-->
Compress data using deflate, and do not append a `zlib` header. Compress data using deflate, and do not append a `zlib` header.
## Class: zlib.Gunzip ## Class: zlib.Gunzip
<!-- YAML
added: v0.5.8
-->
Decompress a gzip stream. Decompress a gzip stream.
## Class: zlib.Gzip ## Class: zlib.Gzip
<!-- YAML
added: v0.5.8
-->
Compress data using gzip. Compress data using gzip.
## Class: zlib.Inflate ## Class: zlib.Inflate
<!-- YAML
added: v0.5.8
-->
Decompress a deflate stream. Decompress a deflate stream.
## Class: zlib.InflateRaw ## Class: zlib.InflateRaw
<!-- YAML
added: v0.5.8
-->
Decompress a raw deflate stream. Decompress a raw deflate stream.
## Class: zlib.Unzip ## Class: zlib.Unzip
<!-- YAML
added: v0.5.8
-->
Decompress either a Gzip- or Deflate-compressed stream by auto-detecting Decompress either a Gzip- or Deflate-compressed stream by auto-detecting
the header. the header.
## Class: zlib.Zlib ## Class: zlib.Zlib
<!-- YAML
added: v0.5.8
-->
Not exported by the `zlib` module. It is documented here because it is the base Not exported by the `zlib` module. It is documented here because it is the base
class of the compressor/decompressor classes. class of the compressor/decompressor classes.
### zlib.flush([kind], callback) ### zlib.flush([kind], callback)
<!-- YAML
added: v0.5.8
-->
`kind` defaults to `zlib.Z_FULL_FLUSH`. `kind` defaults to `zlib.Z_FULL_FLUSH`.
@ -346,40 +379,67 @@ normal call to `.write()`, i.e. it will be queued up behind other pending
writes and will only produce output when data is being read from the stream. writes and will only produce output when data is being read from the stream.
### zlib.params(level, strategy, callback) ### zlib.params(level, strategy, callback)
<!-- YAML
added: v0.11.4
-->
Dynamically update the compression level and compression strategy. Dynamically update the compression level and compression strategy.
Only applicable to deflate algorithm. Only applicable to deflate algorithm.
### zlib.reset() ### zlib.reset()
<!-- YAML
added: v0.7.0
-->
Reset the compressor/decompressor to factory defaults. Only applicable to Reset the compressor/decompressor to factory defaults. Only applicable to
the inflate and deflate algorithms. the inflate and deflate algorithms.
## zlib.createDeflate([options]) ## zlib.createDeflate([options])
<!-- YAML
added: v0.5.8
-->
Returns a new [Deflate][] object with an [options][]. Returns a new [Deflate][] object with an [options][].
## zlib.createDeflateRaw([options]) ## zlib.createDeflateRaw([options])
<!-- YAML
added: v0.5.8
-->
Returns a new [DeflateRaw][] object with an [options][]. Returns a new [DeflateRaw][] object with an [options][].
## zlib.createGunzip([options]) ## zlib.createGunzip([options])
<!-- YAML
added: v0.5.8
-->
Returns a new [Gunzip][] object with an [options][]. Returns a new [Gunzip][] object with an [options][].
## zlib.createGzip([options]) ## zlib.createGzip([options])
<!-- YAML
added: v0.5.8
-->
Returns a new [Gzip][] object with an [options][]. Returns a new [Gzip][] object with an [options][].
## zlib.createInflate([options]) ## zlib.createInflate([options])
<!-- YAML
added: v0.5.8
-->
Returns a new [Inflate][] object with an [options][]. Returns a new [Inflate][] object with an [options][].
## zlib.createInflateRaw([options]) ## zlib.createInflateRaw([options])
<!-- YAML
added: v0.5.8
-->
Returns a new [InflateRaw][] object with an [options][]. Returns a new [InflateRaw][] object with an [options][].
## zlib.createUnzip([options]) ## zlib.createUnzip([options])
<!-- YAML
added: v0.5.8
-->
Returns a new [Unzip][] object with an [options][]. Returns a new [Unzip][] object with an [options][].
@ -395,37 +455,79 @@ Every method has a `*Sync` counterpart, which accept the same arguments, but
without a callback. without a callback.
### zlib.deflate(buf[, options], callback) ### zlib.deflate(buf[, options], callback)
<!-- YAML
added: v0.6.0
-->
### zlib.deflateSync(buf[, options]) ### zlib.deflateSync(buf[, options])
<!-- YAML
added: v0.11.12
-->
Compress a Buffer or string with Deflate. Compress a Buffer or string with Deflate.
### zlib.deflateRaw(buf[, options], callback) ### zlib.deflateRaw(buf[, options], callback)
<!-- YAML
added: v0.6.0
-->
### zlib.deflateRawSync(buf[, options]) ### zlib.deflateRawSync(buf[, options])
<!-- YAML
added: v0.11.12
-->
Compress a Buffer or string with DeflateRaw. Compress a Buffer or string with DeflateRaw.
### zlib.gunzip(buf[, options], callback) ### zlib.gunzip(buf[, options], callback)
<!-- YAML
added: v0.6.0
-->
### zlib.gunzipSync(buf[, options]) ### zlib.gunzipSync(buf[, options])
<!-- YAML
added: v0.11.12
-->
Decompress a Buffer or string with Gunzip. Decompress a Buffer or string with Gunzip.
### zlib.gzip(buf[, options], callback) ### zlib.gzip(buf[, options], callback)
<!-- YAML
added: v0.6.0
-->
### zlib.gzipSync(buf[, options]) ### zlib.gzipSync(buf[, options])
<!-- YAML
added: v0.11.12
-->
Compress a Buffer or string with Gzip. Compress a Buffer or string with Gzip.
### zlib.inflate(buf[, options], callback) ### zlib.inflate(buf[, options], callback)
<!-- YAML
added: v0.6.0
-->
### zlib.inflateSync(buf[, options]) ### zlib.inflateSync(buf[, options])
<!-- YAML
added: v0.11.12
-->
Decompress a Buffer or string with Inflate. Decompress a Buffer or string with Inflate.
### zlib.inflateRaw(buf[, options], callback) ### zlib.inflateRaw(buf[, options], callback)
<!-- YAML
added: v0.6.0
-->
### zlib.inflateRawSync(buf[, options]) ### zlib.inflateRawSync(buf[, options])
<!-- YAML
added: v0.11.12
-->
Decompress a Buffer or string with InflateRaw. Decompress a Buffer or string with InflateRaw.
### zlib.unzip(buf[, options], callback) ### zlib.unzip(buf[, options], callback)
<!-- YAML
added: v0.6.0
-->
### zlib.unzipSync(buf[, options]) ### zlib.unzipSync(buf[, options])
<!-- YAML
added: v0.11.12
-->
Decompress a Buffer or string with Unzip. Decompress a Buffer or string with Unzip.

Loading…
Cancel
Save