@exodus/bytes
    Preparing search index...
    • Create a decoder for a supported legacy multi-byte encoding, given its lowercased name encoding.

      Returns a function decode(arr, stream = false) that decodes bytes to a string.

      The returned function will maintain internal state while stream = true is used, allowing it to handle incomplete multi-byte sequences across multiple calls. State is reset when stream = false or when the function is called without the stream parameter.

      Parameters

      • encoding: string

        The encoding name (e.g., 'gbk', 'gb18030', 'big5', 'euc-jp', 'iso-2022-jp', 'shift_jis', 'euc-kr')

      • Optionalloose: boolean

        If true, replaces unmapped bytes with replacement character instead of throwing (default: false)

      Returns (arr: Uint8Array, stream?: boolean) => string

      A function that decodes bytes to string, with optional streaming support