pub struct FileChunker { /* private fields */ }Expand description
Chunks files using FastCDC algorithm
Implementations§
Source§impl FileChunker
impl FileChunker
Sourcepub fn with_config(config: ChunkingConfig) -> Self
pub fn with_config(config: ChunkingConfig) -> Self
Create with custom config
Sourcepub fn chunk_reader<R: Read>(&self, reader: R) -> StorageResult<Vec<Chunk>>
pub fn chunk_reader<R: Read>(&self, reader: R) -> StorageResult<Vec<Chunk>>
Chunk a file from a reader
Sourcepub fn chunk_bytes(&self, data: &[u8]) -> StorageResult<Vec<Chunk>>
pub fn chunk_bytes(&self, data: &[u8]) -> StorageResult<Vec<Chunk>>
Chunk raw bytes
Sourcepub fn reassemble(chunks: &[Chunk]) -> Bytes
pub fn reassemble(chunks: &[Chunk]) -> Bytes
Reassemble chunks back into original data
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileChunker
impl RefUnwindSafe for FileChunker
impl Send for FileChunker
impl Sync for FileChunker
impl Unpin for FileChunker
impl UnwindSafe for FileChunker
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