Skip to content

Commit

Permalink
doc: note that zlib.flush acts after pending writes
Browse files Browse the repository at this point in the history
Describe that `zlib.flush()` may wait for pending writes and
until output is being read from the stream.

Fixes: #3782
PR-URL: #6172
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Jefe Lindstädt <[email protected]>
  • Loading branch information
addaleax authored and Myles Borins committed Apr 20, 2016
1 parent 07c9f98 commit 50f3f10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/api/zlib.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 50f3f10

Please sign in to comment.