pub struct Q42Archive { /* private fields */ }Expand description
The main Q42 Archive reader utilizing memory-mapping and zero-deserialization structs.
Implementations§
Source§impl Q42Archive
impl Q42Archive
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
Opens and memory-maps a .q42 file, instantly verifying the magic preamble.
Sourcepub fn preamble(&self) -> &Q42Preamble
pub fn preamble(&self) -> &Q42Preamble
Casts the first 64 bytes into the Q42Preamble instantly.
Sourcepub fn read_jump_table(&self, offset: u32, size_bytes: u32) -> &[Q42JumpEntry]
pub fn read_jump_table(&self, offset: u32, size_bytes: u32) -> &[Q42JumpEntry]
Reads a specific jump table from the mapped memory.
Sourcepub fn read_dictionary(&self, offset: u16, size_bytes: u16) -> &[u8] ⓘ
pub fn read_dictionary(&self, offset: u16, size_bytes: u16) -> &[u8] ⓘ
Reads a dictionary from the dictionary sector.
Sourcepub fn decompress_frame(
&self,
entry: &Q42JumpEntry,
dict: &[u8],
) -> Result<Vec<u8>>
pub fn decompress_frame( &self, entry: &Q42JumpEntry, dict: &[u8], ) -> Result<Vec<u8>>
Fetches and decompresses a specific 128KB frame dynamically using the embedded Zstd dictionary.
Auto Trait Implementations§
impl Freeze for Q42Archive
impl RefUnwindSafe for Q42Archive
impl Send for Q42Archive
impl Sync for Q42Archive
impl Unpin for Q42Archive
impl UnsafeUnpin for Q42Archive
impl UnwindSafe for Q42Archive
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more