Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9f9371b

Browse filesBrowse files
addaleaxMylesBorins
authored andcommitted
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: #3782 PR-URL: #6172 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
1 parent 40945e0 commit 9f9371b
Copy full SHA for 9f9371b

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/zlib.markdown‎

Copy file name to clipboardExpand all lines: doc/api/zlib.markdown
+5Lines changed: 5 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ class of the compressor/decompressor classes.
308308
Flush pending data. Don't call this frivolously, premature flushes negatively
309309
impact the effectiveness of the compression algorithm.
310310

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

313318
Dynamically update the compression level and compression strategy.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.