pub const DIRECTORY_PREFIX: &str = "~";Expand description
Prefix tag prepended to a dimension-id key for directory block parts.
The blockfile composite key uses (prefix: String, key: u32). Posting
data blocks use the bare encode_u32(dim_id) as their prefix, while
directory parts prepend this tag so the reader can fetch directories
without pulling posting data:
- Posting blocks: prefix =
encode_u32(dim), key =0, 1, 2, … - Directory parts: prefix =
DIRECTORY_PREFIX.to_owned() + &encode_u32(dim), key =0, 1, 2, …
DIRECTORY_PREFIX must sort after ALL base64-encoded u32 prefixes
(A-Za-z0-9+/=). With little-endian encode_u32, some dimension IDs
produce base64 strings that sort after lowercase letters (e.g., dim
25000 → "qGEAAA=="), so ~ (ASCII 126) is used to guarantee
directory prefixes always sort last.