pub trait ChunkerImpl {
// Required method
fn find_boundary(&mut self, data: &[u8]) -> Option<usize>;
// Provided method
fn reset(&mut self) { ... }
}Expand description
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§
Sourcefn find_boundary(&mut self, data: &[u8]) -> Option<usize>
fn find_boundary(&mut self, data: &[u8]) -> Option<usize>
Look at the new bytes to maybe find a boundary.