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;
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.