pub trait AnyHasher {
Show 14 methods
// Required methods
fn Opts(&self) -> H9Opts;
fn GetHasherCommon(&mut self) -> &mut Struct1;
fn HashBytes(&self, data: &[u8]) -> usize;
fn HashTypeLength(&self) -> usize;
fn StoreLookahead(&self) -> usize;
fn PrepareDistanceCache(&self, distance_cache: &mut [i32]);
fn FindLongestMatch(
&mut self,
dictionary: Option<&BrotliDictionary>,
dictionary_hash: &[u16],
data: &[u8],
ring_buffer_mask: usize,
distance_cache: &[i32],
cur_ix: usize,
max_length: usize,
max_backward: usize,
gap: usize,
max_distance: usize,
out: &mut HasherSearchResult,
) -> bool;
fn Store(&mut self, data: &[u8], mask: usize, ix: usize);
fn StoreRange(
&mut self,
data: &[u8],
mask: usize,
ix_start: usize,
ix_end: usize,
);
fn BulkStoreRange(
&mut self,
data: &[u8],
mask: usize,
ix_start: usize,
ix_end: usize,
);
fn Prepare(
&mut self,
one_shot: bool,
input_size: usize,
data: &[u8],
) -> HowPrepared;
fn StitchToPreviousBlock(
&mut self,
num_bytes: usize,
position: usize,
ringbuffer: &[u8],
ringbuffer_mask: usize,
);
// Provided methods
fn Store4Vec4(&mut self, data: &[u8], mask: usize, ix: usize) { ... }
fn StoreEvenVec4(&mut self, data: &[u8], mask: usize, ix: usize) { ... }
}