Documentation
    Preparing search index...

    Class MUtf8EncoderStream

    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);
    }
    }));

    v1.2.0

    Hierarchy

    • TransformStream<string, Uint8Array>
      • MUtf8EncoderStream
    Index

    Constructors

    Properties

    Accessors

    Constructors

    Properties

    readable: ReadableStream<Uint8Array<ArrayBufferLike>>
    writable: WritableStream<string>

    Accessors

    • get encoding(): string

      The encoding name for this encoder.

      This property is provided for compatibility with the WHATWG TextEncoderStream interface.

      Returns string

      Always "mutf-8"