Block index
The index frame is the only way to find a data block. It is a frame whose location is given by index_off and index_len in the footer.
Payload
Section titled “Payload”The raw payload is a sequence of entries until the end of the payload.
| Field | Encoding | Meaning |
|---|---|---|
klen |
varint | length of the key |
| key | klen bytes |
user key of the last entry of the block |
ts |
u64 LE | timestamp of the last entry |
offset |
u64 LE | offset of the block’s sealed frame |
len |
u32 LE | length of the sealed frame |
The number of index entries is the block count.
- Every
offset + lenmust be at mostbloom_off. - Entries are in key order:
(user asc, ts desc). - To find the block for
(user, ts), binary-search for the first index entry not less than it. - The stats frame, if present, must have the same count as the index.