@@ -3643,13 +3643,18 @@ reader.read().then(({ value, done }) => {
36433643added:
36443644 - v19.9.0
36453645 - v18.17.0
3646+ changes:
3647+ - version: v22.0.0
3648+ pr-url: https://github.com/nodejs/node/pull/52037
3649+ description: bump default highWaterMark.
36463650-->
36473651
36483652* ` objectMode ` {boolean}
36493653* Returns: {integer}
36503654
3651- Returns the default highWaterMark used by streams.
3652- Defaults to ` 65536 ` (64 KiB), or ` 16 ` for ` objectMode ` .
3655+ Returns the default highWaterMark used by streams. Defaults to ` 16 ` for
3656+ ` objectMode ` . For byte streams, it defaults to ` 65536 ` (64 KiB) on non-Windows
3657+ platforms and ` 16384 ` (16 KiB) on Windows.
36533658
36543659### ` stream.setDefaultHighWaterMark(objectMode, value) `
36553660
@@ -3779,7 +3784,7 @@ changes:
37793784* ` options ` {Object}
37803785 * ` highWaterMark ` {number} Buffer level when
37813786 [ ` stream.write() ` ] [ stream-write ] starts returning ` false ` . ** Default:**
3782- ` 65536 ` (64 KiB), or ` 16 ` for ` objectMode ` streams .
3787+ See [ ` stream.getDefaultHighWaterMark() ` ] [ ] .
37833788 * ` decodeStrings ` {boolean} Whether to encode ` string ` s passed to
37843789 [ ` stream.write() ` ] [ stream-write ] to ` Buffer ` s (with the encoding
37853790 specified in the [ ` stream.write() ` ] [ stream-write ] call) before passing
@@ -4153,7 +4158,7 @@ changes:
41534158* ` options` {Object}
41544159 * ` highWaterMark` {number} The maximum [number of bytes][hwm-gotcha] to store
41554160 in the internal buffer before ceasing to read from the underlying resource.
4156- **Default:** ` 65536 ` (64 KiB), or ` 16 ` for ` objectMode ` streams .
4161+ **Default:** See [ ` stream . getDefaultHighWaterMark () ` ][] .
41574162 * ` encoding` {string} If specified, then buffers will be decoded to
41584163 strings using the specified encoding. **Default:** ` null ` .
41594164 * ` objectMode` {boolean} Whether this stream should behave
@@ -5094,6 +5099,7 @@ contain multi-byte characters.
50945099[` stream .cork ()` ]: #writablecork
50955100[` stream .duplexPair ()` ]: #streamduplexpairoptions
50965101[` stream .finished ()` ]: #streamfinishedstream-options-callback
5102+ [` stream .getDefaultHighWaterMark ()` ]: #streamgetdefaulthighwatermarkobjectmode
50975103[` stream .pipe ()` ]: #readablepipedestination-options
50985104[` stream .pipeline ()` ]: #streampipelinesource-transforms-destination-callback
50995105[` stream .uncork ()` ]: #writableuncork
0 commit comments