Skip to main content

Module reader

Module reader 

Source
Expand description

IdfReader — mmap zero-copy reader for IDFv1 files.

Cold load: O(0) parse — open the file, validate the 96-byte header region, set up offset views into the mmap region. Lookup: direct pointer arithmetic, no allocation.

Structs§

Entry
A read-only entry view backed by mmap (when IdfReader was opened from a file) or by an owned byte buffer (in no_std use). word and code borrow string-pool bytes; the lifetime ties them to the underlying reader.
IdfReader
IDFv1 reader. Holds the file’s byte region and the parsed header. entry_index lookups are constant-time arithmetic; FST code/word scans use inputx_fsa directly over the index sections.

Enums§

OpenError
Lookup error kind. Public so callers can distinguish “file is a different IDFv version” from “file is corrupt” — actionable difference: a v2 file should drive a tool upgrade prompt; a corrupt file should drive a rebuild.