[][src]Trait cdchunking::ChunkerImpl

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.

Loading content...

Provided methods

fn reset(&mut self)

Reset the internal state after a chunk has been emitted

Loading content...

Implementors

impl ChunkerImpl for ZPAQ[src]

impl<I: ChunkerImpl> ChunkerImpl for SizeLimited<I>[src]

Loading content...