Row block (format 0)
A row block is a data block whose frame has block format 0. The columnar block is the other data block format.
Layout
Section titled “Layout”entry* ‖ restart offset u32 x R ‖ R u32entry = varint shared ‖ varint unshared ‖ varint vlen ‖ key[shared..] (unshared bytes) ‖ ts u64 ‖ kind u8 ‖ value (vlen bytes)| Field | Encoding | Meaning |
|---|---|---|
shared |
varint | length of the common prefix with the previous entry’s user key |
unshared |
varint | number of key bytes that follow |
vlen |
varint | value length |
| key bytes | unshared bytes |
the remainder of the user key |
ts |
u64 | timestamp |
kind |
u8 | 1 = Put, 2 = Delete (tombstone, vlen = 0) |
| value | vlen bytes |
value |
After the entries come R restart offsets (u32 LE each) and then R itself as a u32 LE.
- Every 16th entry (
RESTART_INTERVAL) is a restart withshared = 0, and its byte offset is listed in the restart array. - Lookup: binary-search the restarts, then scan at most 16 entries (SPEC V50).
- Target raw size is 16 KiB (128 KiB in cold files). A block never exceeds 64 MiB.