pub struct ParallelFastCDC { /* private fields */ }Expand description
FastCDC with a parallel, boundary-identical chunk_slice.
Owns the scalar chunker as its reference implementation and small-input fallback; the parallel path is purely a throughput overlay with byte-identical output (pinned by tests here and by the writer’s pack-twice determinism suite).
Implementations§
Source§impl ParallelFastCDC
impl ParallelFastCDC
Sourcepub fn new(
min_size: usize,
avg_size: usize,
max_size: usize,
) -> Result<Self, &'static str>
pub fn new( min_size: usize, avg_size: usize, max_size: usize, ) -> Result<Self, &'static str>
Construct with explicit size parameters and the default parallel threshold.
§Errors
Same contract as FastCDC::new.
Sourcepub fn with_scalar(scalar: FastCDC, threshold: usize) -> Self
pub fn with_scalar(scalar: FastCDC, threshold: usize) -> Self
Wrap an existing scalar chunker, taking large inputs to the
two-phase path once data.len() >= threshold.
Trait Implementations§
Source§impl Chunker for ParallelFastCDC
impl Chunker for ParallelFastCDC
Source§fn chunk_slice<'a>(&self, data: &'a [u8]) -> Vec<&'a [u8]>
fn chunk_slice<'a>(&self, data: &'a [u8]) -> Vec<&'a [u8]>
Split
data into content-defined chunks. The concatenation
of the returned slices equals data.Source§fn chunk_reader(&self, reader: &mut dyn Read) -> Result<Vec<Vec<u8>>>
fn chunk_reader(&self, reader: &mut dyn Read) -> Result<Vec<Vec<u8>>>
Split a
Read stream into content-defined chunks, returning
each chunk as an owned Vec<u8>. Constant memory bounded by
the chunker’s max chunk size plus one read buffer. Read moreSource§fn avg_chunk_size(&self) -> usize
fn avg_chunk_size(&self) -> usize
Target average chunk size.
Source§impl Clone for ParallelFastCDC
impl Clone for ParallelFastCDC
Source§fn clone(&self) -> ParallelFastCDC
fn clone(&self) -> ParallelFastCDC
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParallelFastCDC
impl Debug for ParallelFastCDC
Auto Trait Implementations§
impl Freeze for ParallelFastCDC
impl RefUnwindSafe for ParallelFastCDC
impl Send for ParallelFastCDC
impl Sync for ParallelFastCDC
impl Unpin for ParallelFastCDC
impl UnsafeUnpin for ParallelFastCDC
impl UnwindSafe for ParallelFastCDC
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more