pub struct MatchFinder { /* private fields */ }Expand description
LZ77 match finder using hash chains.
The match finder maintains a hash table and chain table that are indexed by position in a virtual address space where the dictionary is prepended to the actual data.
Implementations§
Source§impl MatchFinder
impl MatchFinder
Sourcepub fn new(config: &LevelConfig) -> Self
pub fn new(config: &LevelConfig) -> Self
Create a new match finder with the given level configuration.
Sourcepub fn find_sequences(
&mut self,
data: &[u8],
dict: &[u8],
) -> Result<Vec<Lz77Sequence>>
pub fn find_sequences( &mut self, data: &[u8], dict: &[u8], ) -> Result<Vec<Lz77Sequence>>
Find LZ77 sequences in the input data.
The optional dict slice acts as history prepended before data.
Matches may reference bytes in the dictionary. The returned sequences
cover exactly all bytes of data (not the dictionary).
§Errors
Returns an error if internal invariants are violated (should not happen in normal operation).
Auto Trait Implementations§
impl Freeze for MatchFinder
impl RefUnwindSafe for MatchFinder
impl Send for MatchFinder
impl Sync for MatchFinder
impl Unpin for MatchFinder
impl UnsafeUnpin for MatchFinder
impl UnwindSafe for MatchFinder
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