Struct rdedup_cdc::gear::Gear
[−]
[src]
pub struct Gear { pub chunk_bits: u32, // some fields omitted }
Fields
chunk_bits: u32
Methods
impl Gear
[src]
fn new() -> Self
[src]
Create new Gear engine with default chunking settings
fn new_with_chunk_bits(chunk_bits: u32) -> Self
[src]
Create new Gear engine with custom chunking settings
chunk_bits
is number of bits that need to match in
the edge condition. CHUNK_BITS
constant is the default.
fn find_chunk_edge_cond<'a, F>(
&mut self,
buf: &'a [u8],
cond: F
) -> Option<(&'a [u8], &'a [u8])> where
F: Fn(&Self) -> bool,
[src]
&mut self,
buf: &'a [u8],
cond: F
) -> Option<(&'a [u8], &'a [u8])> where
F: Fn(&Self) -> bool,
fn find_chunk_mask<'a>(
&mut self,
buf: &'a [u8],
mask: u64
) -> Option<(&'a [u8], &'a [u8])>
[src]
&mut self,
buf: &'a [u8],
mask: u64
) -> Option<(&'a [u8], &'a [u8])>
Trait Implementations
impl Default for Gear
[src]
impl RollingHash for Gear
[src]
type Digest = u64
fn roll_byte(&mut self, b: u8)
[src]
fn roll(&mut self, buf: &[u8])
[src]
Roll over a slice of bytes
fn digest(&self) -> u64
[src]
Return current rolling sum digest
fn reset(&mut self)
[src]
Resets the internal state