pub struct MatchGeneratorDriver { /* private fields */ }Expand description
This is the default implementation of the Matcher trait. It allocates and reuses the buffers when possible.
Trait Implementations§
Source§impl Matcher for MatchGeneratorDriver
impl Matcher for MatchGeneratorDriver
Source§fn set_file_type_hint(&mut self, file_type: CompressionFileType)
fn set_file_type_hint(&mut self, file_type: CompressionFileType)
Provide a coarse file-type hint so the matcher can choose an internal starting point. Read more
Source§fn set_internal_file_profile_hint(&mut self, file_profile_code: u8)
fn set_internal_file_profile_hint(&mut self, file_profile_code: u8)
Provide a narrower internal file profile when one is known. Read more
Source§fn reset(&mut self, level: CompressionLevel)
fn reset(&mut self, level: CompressionLevel)
Reset this matcher so it can be used for the next new frame
Source§fn window_size(&self) -> u64
fn window_size(&self) -> u64
The size of the window the decoder will need to execute all sequences produced by this matcher Read more
Source§fn get_next_space(&mut self) -> Vec<u8> ⓘ
fn get_next_space(&mut self) -> Vec<u8> ⓘ
Get a space where we can put data to be matched on. Will be encoded as one block. The maximum allowed size is 128 kB.
Source§fn get_last_space(&self) -> &[u8] ⓘ
fn get_last_space(&self) -> &[u8] ⓘ
Get a reference to the last commited space
Source§fn commit_space(&mut self, space: Vec<u8>)
fn commit_space(&mut self, space: Vec<u8>)
Commit a space to the matcher so it can be matched against
Source§fn start_matching(&mut self, handle_sequence: impl for<'a> FnMut(Sequence<'a>))
fn start_matching(&mut self, handle_sequence: impl for<'a> FnMut(Sequence<'a>))
Process the data in the last commited space for future matching AND generate matches for the data
Source§fn set_repeat_offsets(&mut self, newest: u32, second: u32, third: u32)
fn set_repeat_offsets(&mut self, newest: u32, second: u32, third: u32)
Synchronize the matcher with the encoder’s current repeat-offset history. Read more
Source§fn skip_matching(&mut self)
fn skip_matching(&mut self)
Just process the data in the last commited space for future matching
Source§fn skip_matching_for_incompressible(&mut self)
fn skip_matching_for_incompressible(&mut self)
Mark the last committed space as processed without indexing it for future matches. Read more
Source§fn skip_matching_for_rle(&mut self)
fn skip_matching_for_rle(&mut self)
Mark the last committed space as processed after it was emitted as an RLE block. Read more
Auto Trait Implementations§
impl Freeze for MatchGeneratorDriver
impl RefUnwindSafe for MatchGeneratorDriver
impl Send for MatchGeneratorDriver
impl Sync for MatchGeneratorDriver
impl Unpin for MatchGeneratorDriver
impl UnsafeUnpin for MatchGeneratorDriver
impl UnwindSafe for MatchGeneratorDriver
Blanket Implementations§
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