Skip to content

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.

Uint8Array

number

readonly [Uint8Array<ArrayBufferLike>, number]

INVALID_KEY_VALUE or INVALID_OFFSET, as decodeUint32Key.

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.