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.
  • Loading branch information
addaleax committed Apr 18, 2016
1 parent aba035f commit 5a84875
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 @@ -282,6 +282,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 5a84875

Please sign in to comment.