Skip to main content

Module keycode

Module keycode 

Source
Expand description

Order-preserving codec used to turn typed keys into the bytes that go on disk.

Encoded byte sequences sort lexicographically in the same order as the logical keys they represent, so range scans over the storage tier produce results in natural key order without any decode pass. Submodules cover the catalog-specific key encodings, the generic Serializer and Deserializer pair, and per-type encoders for booleans, floats, and signed and unsigned integers.

Invariant: the codec is order-preserving. For any two values a < b in their natural ordering, their encoded bytes must satisfy encode(a) < encode(b) lexicographically. Storage range queries, CDC, and replication all rely on this property; breaking it silently corrupts every range-scan-based operation in the workspace.

Modules§

catalog
deserialize
deserializer
serialize
serializer
varint

Traits§

ByteSink

Functions§

decode_i64_varint
decode_u64_varint
deserialize
encode_bool
encode_bytes
encode_f32
encode_f64
encode_i8
encode_i16
encode_i32
encode_i64
encode_i64_varint
encode_i128
encode_u8
encode_u16
encode_u32
encode_u64
encode_u32_varint
encode_u64_varint
encode_u128
serialize