Skip to content

encodeDescendingBytesKey(value): Uint8Array

Defined in: packages/key-encoding/src/scalars.ts:264

Encode a byte string so that keys sort in reverse byte-string order, longer before shorter on a shared prefix.

The bitwise complement of encodeBytesKey. Because that encoding is self-delimiting, no key is a prefix of another, so complementing it reverses the order exactly.

Uint8Array

Uint8Array

INVALID_KEY_VALUE when value is not a Uint8Array.