Skip to content

Commit 5a84875

Browse files
committed
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.
1 parent aba035f commit 5a84875

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/api/zlib.markdown

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ class of the compressor/decompressor classes.
282282
Flush pending data. Don't call this frivolously, premature flushes negatively
283283
impact the effectiveness of the compression algorithm.
284284

285+
Calling this only flushes data from the internal zlib state, and does not
286+
perform flushing of any kind on the streams level. Rather, it behaves like a
287+
normal call to `.write()`, i.e. it will be queued up behind other pending
288+
writes and will only produce output when data is being read from the stream.
289+
285290
### zlib.params(level, strategy, callback)
286291

287292
Dynamically update the compression level and compression strategy.

0 commit comments

Comments
 (0)