Chunker

Trait Chunker 

Source
pub trait Chunker {
    // Required method
    fn put_reader(&mut self, rdr: &mut dyn Read) -> Result<Vec<Chunk>>;

    // Provided method
    fn put_bytes(&mut self, bytes: &[u8]) -> Result<Vec<Chunk>> { ... }
}
Expand description

Algorithm to slice and/or deduplicate file content.

Required Methods§

Source

fn put_reader(&mut self, rdr: &mut dyn Read) -> Result<Vec<Chunk>>

Put data via a Read instance into the archive, and return the chunking result ready for crate::metadata::Builder::put_file.

Provided Methods§

Source

fn put_bytes(&mut self, bytes: &[u8]) -> Result<Vec<Chunk>>

Put in-memory data into the archive.

This is a shortcut to Chunker::put_reader.

Implementors§