decodeBytesKey(
bytes,offset?): readonly [Uint8Array<ArrayBufferLike>,number]
Defined in: packages/key-encoding/src/scalars.ts:202
Decode one encodeBytesKey encoding at offset, returning the byte string and the offset after its terminator.
Parameters
Section titled “Parameters”Uint8Array
offset?
Section titled “offset?”number
Returns
Section titled “Returns”readonly [Uint8Array<ArrayBufferLike>, number]
Throws
Section titled “Throws”INVALID_KEY_VALUE or INVALID_OFFSET, as decodeUint32Key.
Throws
Section titled “Throws”TRUNCATED_KEY when the bytes end before the terminator,
INVALID_ESCAPE_SEQUENCE when a 0x00 is followed by a byte other than 0xff or 0x00, or TRAILING_BYTES as
decodeUint32Key.