pub enum Decompressor {
Zstd(Decompressor<'static>),
Lz4,
}Expand description
A decompressor that is capable of decompressing chunks of a compressed archive.
Variants§
Zstd(Decompressor<'static>)
Lz4
Implementations§
Source§impl Decompressor
impl Decompressor
Sourcepub fn decompress(
&mut self,
data: &[u8],
uncompressed_size: usize,
chunk_index: usize,
) -> Result<Vec<u8>, ChunkedArchiveError>
pub fn decompress( &mut self, data: &[u8], uncompressed_size: usize, chunk_index: usize, ) -> Result<Vec<u8>, ChunkedArchiveError>
Decompresses a chunk of a chunked-compression archive.
Sourcepub fn decompress_into<'a>(
&mut self,
data: &[u8],
destination: &'a mut [u8],
chunk_index: usize,
) -> Result<usize, ChunkedArchiveError>
pub fn decompress_into<'a>( &mut self, data: &[u8], destination: &'a mut [u8], chunk_index: usize, ) -> Result<usize, ChunkedArchiveError>
Decompresses a chunk of a chunked-compression archive into a pre-allocated buffer.
Auto Trait Implementations§
impl Freeze for Decompressor
impl RefUnwindSafe for Decompressor
impl Send for Decompressor
impl !Sync for Decompressor
impl Unpin for Decompressor
impl UnsafeUnpin for Decompressor
impl UnwindSafe for Decompressor
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> 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