Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IEncoder

Converts a set of characters into a sequence of bytes.

Hierarchy

  • IEncoder

Index

Properties

Methods

Properties

hasState

hasState: boolean

Check if this encoder currently has accumulated state.

Methods

end

  • end(): Buffer
  • Returns any remaining input stored in the internal buffer as a Buffer. Incomplete characters will be replaced with substitution characters and encoded appropriate for the character encoding.

    Returns Buffer

write

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

    Parameters

    • str: string

      A string to encode.

    Returns Buffer

Generated using TypeDoc