pub struct V06File {
pub h: Header06,
pub root: Root06,
pub reader: Arc<dyn RangeReader + Sync + Send>,
}Expand description
An open 0x06 file: its header and root, and the reader.
Fields§
§h: Header06The 128-byte header.
root: Root06The decoded root block.
reader: Arc<dyn RangeReader + Sync + Send>Where everything else is read from.
Implementations§
Source§impl V06File
impl V06File
Sourcepub fn open(
reader: Arc<dyn RangeReader + Sync + Send>,
first: &[u8],
) -> Result<V06File, FileError>
pub fn open( reader: Arc<dyn RangeReader + Sync + Send>, first: &[u8], ) -> Result<V06File, FileError>
Open from first, the file’s leading bytes (at least the header; the
root is read from it when it fits, else fetched).
Sourcepub fn bound(&self, k: u8) -> u64
pub fn bound(&self, k: u8) -> u64
The decompression bound of section k’s blocks: its recorded largest
block, or BLOCK_CEILING where none is recorded.
Sourcepub fn fetch(
&self,
) -> Arc<dyn Fn(&[(u64, u64)]) -> Option<Vec<Vec<u8>>> + Sync + Send> ⓘ
pub fn fetch( &self, ) -> Arc<dyn Fn(&[(u64, u64)]) -> Option<Vec<Vec<u8>>> + Sync + Send> ⓘ
A batched leaf fetcher over this file’s reader (leaves are stored with the internal codec; decoding happens in the directory types).
Sourcepub fn card(&self) -> Result<Option<Vec<u8>>, FileError>
pub fn card(&self) -> Result<Option<Vec<u8>>, FileError>
The Dataset Card (decompressed), if the file has one.
Sourcepub fn build_record(&self) -> Result<Option<Vec<u8>>, FileError>
pub fn build_record(&self) -> Result<Option<Vec<u8>>, FileError>
The build record (raw), if the file has one.
Sourcepub fn schema_section_bytes(&self) -> Option<Vec<u8>>
pub fn schema_section_bytes(&self) -> Option<Vec<u8>>
The stats + schema section, as the 0x05 SCHEMA section bytes
(digest-prefixed) its decoder takes.
Sourcepub fn schema(&self) -> Option<SchemaMeta>
pub fn schema(&self) -> Option<SchemaMeta>
The decoded stats + schema section.
Sourcepub fn pyramid_bytes(&self) -> Option<Vec<u8>>
pub fn pyramid_bytes(&self) -> Option<Vec<u8>>
The community pyramid’s bytes.
Sourcepub fn dictionary(&self, want: [bool; 4]) -> Result<Dictionary, FileError>
pub fn dictionary(&self, want: [bool; 4]) -> Result<Dictionary, FileError>
The four dictionary sections, two-level, chunks faulted on demand.
want[si] == false leaves that section empty (a search-only open).
Sourcepub fn index(&self, read_concurrency: usize) -> Result<GraphIndex, FileError>
pub fn index(&self, read_concurrency: usize) -> Result<GraphIndex, FileError>
The default graph’s index, two-level, tiles faulted on demand.
Sourcepub fn text_index(&self) -> Option<Result<TextIndex, FileError>>
pub fn text_index(&self) -> Option<Result<TextIndex, FileError>>
The text index (leafed token table), if the file has one.
Sourcepub fn token_table_bytes(&self) -> Option<u64>
pub fn token_table_bytes(&self) -> Option<u64>
Stored bytes of the token table (all leaves) — what a substring search would read; a word lookup reads one leaf.
Sourcepub fn label_index(&self) -> Option<Result<LabelIndex, FileError>>
pub fn label_index(&self) -> Option<Result<LabelIndex, FileError>>
The label index, if the file has one.
Sourcepub fn label_entry_count(&self) -> Option<u64>
pub fn label_entry_count(&self) -> Option<u64>
The label index’s entry count, from the root alone.
Sourcepub fn quad_root(&self) -> Option<Result<QuadRoot, FileError>>
pub fn quad_root(&self) -> Option<Result<QuadRoot, FileError>>
The quad index’s root, if the file has named graphs.