pub struct CompressionReader { /* private fields */ }Expand description
The compression algorithm a reader uses to decompress a Data.db’s chunks.
Reduced to a plain algorithm field (issue #1597 / G1): the reader derives the
algorithm from the single authoritative CompressionInfo.db parse and every
decompression site funnels through Compression::decompress via
CompressionReader::algorithm. The former streaming half (read_streaming,
read, with_block_size, block_size, and the buffer/block_size fields)
had zero consumers and was deleted.
Implementations§
Source§impl CompressionReader
impl CompressionReader
Sourcepub fn new(algorithm: CompressionAlgorithm) -> Self
pub fn new(algorithm: CompressionAlgorithm) -> Self
Create a compression reader for the given algorithm.
Sourcepub fn algorithm(&self) -> &CompressionAlgorithm
pub fn algorithm(&self) -> &CompressionAlgorithm
Get the compression algorithm.
Auto Trait Implementations§
impl Freeze for CompressionReader
impl RefUnwindSafe for CompressionReader
impl Send for CompressionReader
impl Sync for CompressionReader
impl Unpin for CompressionReader
impl UnsafeUnpin for CompressionReader
impl UnwindSafe for CompressionReader
Blanket Implementations§
impl<T> Allocation for T
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