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

Look at the new bytes to maybe find a boundary.

Provided Methods

Reset the internal state after a chunk has been emitted

Implementors