Skip to content

Each add in an edit describes one SEAM data file being added to a level. The entry duplicates facts from the file’s footer and index so the store can plan reads without opening the file.

Field Encoding Meaning
level u8 0 is L0; 1 and up are sorted levels
id varint file id
size varint file size in bytes (needed for remote files)
entries varint entry count
min_ts varint smallest timestamp
max_ts varint largest timestamp
smallest key smallest key
largest key largest key

A key is varint len ‖ user bytes ‖ varint ts.

Three more per-add values live outside the entry, in arrays that must have exactly n_adds items:

  • location, 0 local or 1 remote, in the main edit body (omitted only by very old writers);
  • global_ts, in tag 2;
  • the per-file stamp, in tag 5.

The meaning of each field is on State and levels.