pub struct CompressionBlock {
pub uncompressed_size: u32,
pub compressed_size: u32,
pub flags: u16,
}Expand description
Compression block information
Fields§
§uncompressed_size: u32Uncompressed size of the block
compressed_size: u32Compressed size of the block
flags: u16Compression flags
Implementations§
Source§impl CompressionBlock
impl CompressionBlock
Sourcepub fn new(uncompressed_size: u32, compressed_size: u32, flags: u16) -> Self
pub fn new(uncompressed_size: u32, compressed_size: u32, flags: u16) -> Self
Create a new compression block
Sourcepub fn compression_type(&self) -> Result<CompressionType>
pub fn compression_type(&self) -> Result<CompressionType>
Get the compression type for this block
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Check if this block is compressed
Trait Implementations§
Source§impl Clone for CompressionBlock
impl Clone for CompressionBlock
Source§fn clone(&self) -> CompressionBlock
fn clone(&self) -> CompressionBlock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompressionBlock
impl RefUnwindSafe for CompressionBlock
impl Send for CompressionBlock
impl Sync for CompressionBlock
impl Unpin for CompressionBlock
impl UnwindSafe for CompressionBlock
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