Trait cdchunking::ChunkerImpl
[−]
[src]
pub trait ChunkerImpl { fn find_boundary(&mut self, data: &[u8]) -> Option<usize>; fn reset(&mut self) { ... } }
This class is the internal method of finding chunk boundaries.
It can look at the actual bytes or not, for example: * Use a rolling algorithm such as ZPAQ or Adler32 * Find some predefined boundary in the data * Make blocks of a fixed size (then it's NOT content-defined!)
This is where the internal state of the algorithm should be kept (counter, hash, etc).
Required Methods
fn find_boundary(&mut self, data: &[u8]) -> Option<usize>
Look at the new bytes to maybe find a boundary.
Provided Methods
fn reset(&mut self)
Reset the internal state after a chunk has been emitted
Implementors
impl<I: ChunkerImpl> ChunkerImpl for SizeLimited<I>
impl ChunkerImpl for ZPAQ