mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
doc: watermark string behavior
Documents that we calculate the highWaterMark value of streams operating on strings using the number of UTF-16 code units. Fixes: https://github.com/nodejs/node/issues/52818 PR-URL: https://github.com/nodejs/node/pull/52842 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
1 parent
fbce3178ba
commit
5d3ee7205d
1 file changed
+3
-1
+3
-1
@@ -317,7 +317,9 @@ buffer.
|
||||
The amount of data potentially buffered depends on the `highWaterMark` option
|
||||
passed into the stream's constructor. For normal streams, the `highWaterMark`
|
||||
option specifies a [total number of bytes][hwm-gotcha]. For streams operating
|
||||
in object mode, the `highWaterMark` specifies a total number of objects.
|
||||
in object mode, the `highWaterMark` specifies a total number of objects. For
|
||||
streams operating on (but not decoding) strings, the `highWaterMark` specifies
|
||||
a total number of UTF-16 code units.
|
||||
|
||||
Data is buffered in `Readable` streams when the implementation calls
|
||||
[`stream.push(chunk)`][stream-push]. If the consumer of the Stream does not
|
||||
|
||||
Reference in new issue
Block a user