merkle-trie / org.apache.tuweni.trie / CompactEncoding

CompactEncoding

class CompactEncoding (source)

Compact (Hex-prefix) encoding and decoding.

An implementation of Compact (Hex-prefix) encoding.

Properties

LEAF_TERMINATOR

static val LEAF_TERMINATOR: Byte

Functions

bytesToPath

static fun bytesToPath(bytes: Bytes): Bytes

Calculate a RADIX-16 path for a given byte sequence.

decode

static fun decode(encoded: Bytes): Bytes

Decode a compact-encoded path to Radix-16.

encode

static fun encode(path: Bytes): Bytes

Encode a Radix-16 path.