pub struct GeomInfo {
pub max_handle: u64,
pub entries: Vec<GeomEntry>,
}Expand description
Aggregated geometry information for the file.
Fields§
§max_handle: u64Highest signal handle defined by the geometry payload.
entries: Vec<GeomEntry>Per-handle geometry entries (1-based in the FST file, 0-based in this vector).
Implementations§
Source§impl GeomInfo
impl GeomInfo
Sourcepub fn from_runs<I>(runs: I) -> Result<Self>
pub fn from_runs<I>(runs: I) -> Result<Self>
Constructs geometry information from a set of coalesced runs. Each run adds count
consecutive handles sharing the same geometry entry.
Sourcepub fn entry(&self, handle: u32) -> Option<&GeomEntry>
pub fn entry(&self, handle: u32) -> Option<&GeomEntry>
Returns the recorded entry for the provided 1-based handle, if available.
Sourcepub fn handles(&self) -> impl Iterator<Item = (u32, &GeomEntry)>
pub fn handles(&self) -> impl Iterator<Item = (u32, &GeomEntry)>
Returns an iterator over (handle, entry) pairs for all recorded handles.
Sourcepub fn decode_block<R: Read>(
reader: &mut R,
section_length: u64,
) -> Result<Self>
pub fn decode_block<R: Read>( reader: &mut R, section_length: u64, ) -> Result<Self>
Decodes a geometry section from the provided reader. The section_length must be the raw
value stored in the file (including the 8-byte length word itself).
Sourcepub fn encode_block(&self, compress: bool) -> Result<EncodedGeometry>
pub fn encode_block(&self, compress: bool) -> Result<EncodedGeometry>
Encodes the geometry information into an FST block payload. When compress is true, the
encoder attempts zlib compression and falls back to the raw stream if compression is
ineffective.