The bytes to decode
Optionalformat: "uint16"Input format (default: 'uint16')
The decoded string
Decode UTF-16 bytes to a string (loose mode)
Replaces invalid UTF-16 byte sequences with replacement codepoints U+FFFD
per WHATWG Encoding specification.
Such replacement is a non-injective function, is irreversible and causes collisions.
Prefer using strict throwing methods for cryptography applications.
Throws on non-even byte length.
The bytes to decode
Input format (default: 'uint16')
The decoded string
Decode UTF-16 bytes to a string (loose mode)
Replaces invalid UTF-16 byte sequences with replacement codepoints U+FFFD
per WHATWG Encoding specification.
Such replacement is a non-injective function, is irreversible and causes collisions.
Prefer using strict throwing methods for cryptography applications.
Throws on non-even byte length.
The bytes to decode
Input format (default: 'uint16')
The decoded string
Decode UTF-16 bytes to a string (loose mode)
Replaces invalid UTF-16 byte sequences with replacement codepoints U+FFFD
per WHATWG Encoding specification.
Such replacement is a non-injective function, is irreversible and causes collisions.
Prefer using strict throwing methods for cryptography applications.
Throws on non-even byte length.
The bytes to decode
Optionalformat: Utf16FormatInput format (default: 'uint16')
The decoded string
Decode UTF-16 bytes to a string (loose mode)
Replaces invalid UTF-16 byte sequences with replacement codepoints
U+FFFDper WHATWG Encoding specification.Such replacement is a non-injective function, is irreversible and causes collisions.
Prefer using strict throwing methods for cryptography applications.
Throws on non-even byte length.