pub struct Block {
pub coders: Vec<Coder>,
pub has_crc: bool,
pub crc: u64,
/* private fields */
}
Expand description
Represents a compression block.
A block contains one or more coders (compression/filter methods) that are chained together to process data.
Fields§
§coders: Vec<Coder>
Coders (compression/filter methods) in this block.
has_crc: bool
Whether this block has a CRC checksum.
crc: u64
CRC32 checksum of the block data.
Implementations§
Source§impl Block
impl Block
Sourcepub fn get_unpack_size(&self) -> u64
pub fn get_unpack_size(&self) -> u64
Returns the total uncompressed size of data in this block.
Sourcepub fn get_unpack_size_for_coder(&self, coder: &Coder) -> u64
pub fn get_unpack_size_for_coder(&self, coder: &Coder) -> u64
Returns the uncompressed size for a specific coder within this block.
§Arguments
coder
- The coder to get the unpack size for
Sourcepub fn get_unpack_size_at_index(&self, index: usize) -> u64
pub fn get_unpack_size_at_index(&self, index: usize) -> u64
Returns the uncompressed size for the coder at the specified index.
§Arguments
index
- The index of the coder to get the unpack size for
Sourcepub fn ordered_coder_iter(&self) -> OrderedCoderIter<'_> ⓘ
pub fn ordered_coder_iter(&self) -> OrderedCoderIter<'_> ⓘ
Returns an iterator over the coders in their processing order.
Coders are chained together in blocks, and this iterator follows the chain from the first coder to the last in their proper execution order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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