@kayahr/text-encoding

    Class TextDecoder

    The TextDecoder represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, KOI8-R, GBK, etc. A decoder takes a stream of bytes as input and emits a stream of code points.

    Implements

    • TextDecoder
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Creates text decoder for the given encoding.

      Parameters

      • label: string = DEFAULT_ENCODING

        The label of the encoding. Defaults to 'utf-8'

      • __namedParameters: TextDecoderOptions = {}

      Returns TextDecoder

    Properties

    fatal: boolean

    True if error mode is fatal.

    ignoreBOM: boolean

    True if byte order marker is ignored.

    Accessors

    • get encoding(): string

      Returns string

      The name of the encoding.

    Methods

    • Decoded the given input into string and returns it.

      Parameters

      • Optionalinput: BufferSource

        The input to decode.

      • options: TextDecodeOptions = {}

        The decoding options.

      Returns string

      The decoded string.

    MMNEPVFCICPMFPCPTTAAATR