Skip-tag tail
A skip-tag tail is used when the footer has BLOOM_SKIP set and BLOOM_RANGES clear. It tells the reader that keys whose first byte is one of the listed tags were not added to the bloom filter.
Layout
Section titled “Layout”bits ‖ tags ‖ n_tags u8| Part | Meaning |
|---|---|
bits |
the filter blocks; len(bits) % 32 == 0 |
tags |
n_tags bytes, the skipped first-byte values |
n_tags |
last byte of the frame, at least 1 |
Reader behaviour
Section titled “Reader behaviour”For a key whose first byte is in tags, may_contain is true without consulting the bits. For any other key the normal test applies. A malformed tail is Corrupt("bloom skip").
Writer behaviour
Section titled “Writer behaviour”The SQL layer registers skip tag 0x02, because non-unique index entries are only range-scanned. Current writers put a skip tail in a revision 5 footer; revisions 2 and 3 carry it in older files, see Choosing a footer revision.