We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7013248 commit 19bc7e4Copy full SHA for 19bc7e4
lib/internal/streams/utils.js
@@ -278,7 +278,7 @@ function isErrored(stream) {
278
function encodeWithFastPath(input, encoding) {
279
const enc = normalizeEncoding(encoding);
280
281
- if (enc === 'utf8') {
+ if (enc === 'utf8' && TypedArrayPrototypeGetByteLength(input) > 512) {
282
const buf = encoder.encode(input);
283
return new FastBuffer(
284
TypedArrayPrototypeGetBuffer(buf),
0 commit comments