doc: note that zlib.flush acts after pending writes

Describe that `zlib.flush()` may wait for pending writes and
until output is being read from the stream.

Fixes: https://github.com/nodejs/node/issues/3782
PR-URL: https://github.com/nodejs/node/pull/6172
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
pull/6172/merge
Anna Henningsen 2016-04-12 21:50:05 +02:00
parent 2dc5ad460a
commit 9c2b8ecc54
No known key found for this signature in database
GPG Key ID: D8B9F5AEAE84E4CF
1 changed files with 5 additions and 0 deletions

View File

@ -308,6 +308,11 @@ class of the compressor/decompressor classes.
Flush pending data. Don't call this frivolously, premature flushes negatively
impact the effectiveness of the compression algorithm.
Calling this only flushes data from the internal zlib state, and does not
perform flushing of any kind on the streams level. Rather, it behaves like a
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.
### zlib.params(level, strategy, callback)
Dynamically update the compression level and compression strategy.