The streaming equivalent of MUtf8Encoder.
This transform stream provides efficient encoding of text strings into Modified UTF-8 byte sequences in streaming scenarios, allowing you to process large amounts of text without loading everything into memory.
import { MUtf8EncoderStream } from 'mutf-8-stream';await textStream .pipeThrough(new MUtf8EncoderStream()) .pipeTo(new WritableStream({ write(binaryChunk) { console.log('Encoded bytes:', binaryChunk); } })); Copy
import { MUtf8EncoderStream } from 'mutf-8-stream';await textStream .pipeThrough(new MUtf8EncoderStream()) .pipeTo(new WritableStream({ write(binaryChunk) { console.log('Encoded bytes:', binaryChunk); } }));
v1.2.0
Readonly
MDN Reference
The encoding name for this encoder.
This property is provided for compatibility with the WHATWG TextEncoderStream interface.
TextEncoderStream
Always "mutf-8"
"mutf-8"
The streaming equivalent of MUtf8Encoder.
This transform stream provides efficient encoding of text strings into Modified UTF-8 byte sequences in streaming scenarios, allowing you to process large amounts of text without loading everything into memory.
Example
See
Since
v1.2.0