Skip to main content

serialize_paged_string_lexicon

Function serialize_paged_string_lexicon 

Source
pub fn serialize_paged_string_lexicon(
    entries: &HashMap<u64, String>,
    page_entries: usize,
) -> Result<Vec<u8>, LexError>
Expand description

Serialize the v2 paged Q42LEX representation.

Unlike the original monolithic index, this stores a small page directory at the front followed by independently valid pages. Pages deliberately stay uncompressed in v2: they can be returned as borrowed &str values by the existing zero-allocation resolver. Compression is a transport concern for a whole Q42 range response; keeping page contents directly addressable is what preserves the ABI and HTTP-range streamability today.