pub enum Form {
Identity,
Dense,
Sorted,
Permuted,
}Expand description
Which of the three physical forms a key map took.
Variants§
Identity
rid = key - base, and nothing is stored but base and the count.
Dense
rid = rank(key - base) over a bitmap of the range, with a two level rank index.
Sorted
Binary search over the sorted keys, then a permutation lookup.
Permuted
rid = perm[rank(key - base)], the dense form with a permutation behind it.
Implementations§
Source§impl Form
impl Form
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
What this form is called where a person reads it, which is rudb_links().
Sourcepub fn from_tag(tag: u8) -> Result<Self>
pub fn from_tag(tag: u8) -> Result<Self>
The form a header tag names.
§Errors
If the tag is not one of the three. A reader that meets an unfamiliar form has met a file written by a later build, and the right response is the one section 3.2 requires of an unfamiliar section kind: ignore this key map and answer the query without it. So this returns an error and the caller drops the section rather than failing the open.