pub struct CdcChunker<W> { /* private fields */ }
Expand description
The deduplicating chunker using Content Defined Chunking (CDC).
The exact algorithm used may change. Currently it uses rustic_cdc.
Implementations§
Source§impl<W> CdcChunker<W>
impl<W> CdcChunker<W>
Sourcepub fn new(inner: BasicChunker<W>) -> Self
pub fn new(inner: BasicChunker<W>) -> Self
Create the deduplicating chunker on top of a BasicChunker
.
Sourcepub fn deduplicated_bytes(&self) -> u64
pub fn deduplicated_bytes(&self) -> u64
Get the total deduplicated bytes.
Trait Implementations§
Source§impl<W: Write> Chunker for CdcChunker<W>
impl<W: Write> Chunker for CdcChunker<W>
Source§fn put_reader(&mut self, rdr: &mut dyn Read) -> Result<Vec<Chunk>>
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
.Auto Trait Implementations§
impl<W> Freeze for CdcChunker<W>where
W: Freeze,
impl<W> !RefUnwindSafe for CdcChunker<W>
impl<W> Send for CdcChunker<W>where
W: Send,
impl<W> Sync for CdcChunker<W>where
W: Sync,
impl<W> Unpin for CdcChunker<W>where
W: Unpin,
impl<W> !UnwindSafe for CdcChunker<W>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more