Block head
A posting block is the value of a BLOCKS key, see Posting keys. Every revision starts with a common head that holds the entry count and the tier bounds. The head is also how a reader tells the revisions apart.
Marked head (revisions 2 to 5)
Section titled “Marked head (revisions 2 to 5)”0x00 ‖ version u8 ‖ varint n (<= 1024) ‖ tiers u8 (<= 4) ‖ tiers × (varint a ‖ varint b)| Field | Encoding | Meaning |
|---|---|---|
| marker | 0x00 |
A value that starts with 0x00 is marked |
version |
u8 | The revision byte: 0xE2 (or the early 0x02), 0xE3, 0xE4, 0xE5 |
n |
varint, at most 1024 | Number of entries in the block |
tiers |
u8, at most 4 | Number of tier bounds |
| bounds | tiers pairs of varints a and b |
Tier bounds. Writers group entries by the first payload varint a (tier min(max(a,1),4)) and store per tier the largest a and the smallest second payload varint b; readers use them to skip blocks |
The body follows the head and is described on the page of the revision.
Unmarked head (revision 1)
Section titled “Unmarked head (revision 1)”A value that does not start with 0x00 is revision 1. Its head has no marker and no revision byte: varint n ‖ tiers ‖ bounds. See Revision 1.
Choosing the revision
Section titled “Choosing the revision”| First byte | Next byte | Revision |
|---|---|---|
not 0x00 |
1, unmarked | |
0x00 |
0x02 or 0xE2 |
2 |
0x00 |
0xE3 |
3 |
0x00 |
0xE4 |
4 |
0x00 |
0xE5 |
5 |
0x00 |
0xE6 to 0xEF |
NewerFormat |
For 0xE6 to 0xEF the message is posting block format N is newer than this build supports (229); upgrade strata, where 229 is the highest revision byte this format knows (0xE5). See Error classes.
Limits: n is at most 1024 and tiers is at most 4 (writers split blocks at 512 entries). Any other second byte after 0x00 is rejected as a corrupt posting list.