-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
Minor bug. Not sure if it's worth the performance impact of fixing.
When calculating the currently buffered length we are not correctly calculating the byte length of strings, we just use the string length.
function writeOrBuffer(stream, state, chunk, encoding, callback) {
const len = (state[kState] & kObjectMode) !== 0 ? 1 : chunk.length;
state.length += len;Metadata
Metadata
Assignees
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.