Tag 5: per-file stamp
Tag 5 records, for every file added by an edit, the format stamp that the file’s bytes conform to. This is the per-file stamp, separate from the store stamp in the header.
varint n (== n_adds) ‖ n x varint formatnmust equal the number of adds in the edit.- Each
formatis at least 1. - A writer emits the tag only if some add has format other than 1. When the tag is absent, every file has pre-1 (SPEC V458).
How the stamp is computed
Section titled “How the stamp is computed”A file’s stamp is the minimum of the writer’s current format and the stamps of every source file whose blocks were copied verbatim into it. Flush, compaction and rewrite outputs carry the writer’s format unless blocks were copied through. Copying an old block into a new file keeps that file at the old stamp, because the old block’s bytes still follow the old layout.
Format pre-4 is the SEAM 1 layout; pre-1 to pre-3 are pre-release stamps. The migration background job upgrades files whose stamp is below the current one, see Migration.