Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IDecoder

Converts a sequence of encoded bytes into a set of characters.

Hierarchy

  • IDecoder

Index

Properties

Methods

Properties

hasState

hasState: boolean

Check if this decoder currently has accumulated state in the internal buffer.

Methods

end

  • end(): string
  • Returns any remaining input stored in the internal buffer as a string. Bytes representing incomplete characters will be replaced with substitution characters appropriate for the character encoding.

    Returns string

write

  • write(buf: Buffer): string
  • Returns a decoded string, ensuring that any incomplete multibyte characters at the end of the Buffer are omitted from the returned string and stored in an internal buffer for the next call to write() or end().

    Parameters

    • buf: Buffer

      A buffer containing the bytes to decode.

    Returns string

Generated using TypeDoc