Struct Chunk
pub struct Chunk { pub layer_index: usize, pub compressed_block: CompressedBlock }
A generic block of pixel information.
Contains pixel data and an index to the corresponding header. All pixel data in a file is split into a list of chunks. Also contains positioning information that locates this data block in the referenced layer. The byte data is in little-endian format, as these bytes will be written into the file directly.
Fields
layer_index: usizeThe index of the layer that the block belongs to. This is required as the pixel data can appear in any order in a file.
compressed_block: CompressedBlockThe compressed pixel contents. This data is compressed and in little-endian format.
Implementations
impl Chunk
fn write(&self, write: &mut impl Write, header_count: usize) -> UnitResultWithout validation, write this instance to the byte stream.
fn read(read: &mut impl Read, meta_data: &MetaData) -> Result<Self>Read the value without validating.
Trait Implementations
impl Clone for Chunk
fn clone(&self) -> Self
impl Debug for Chunk
fn fmt(&self, f: &mut Formatter<'_>) -> Result