pub struct FpZipHeader {
pub data_type: FpZipType,
pub prec: u32,
pub nx: u32,
pub ny: u32,
pub nz: u32,
pub nf: u32,
}Expand description
Metadata header for FpZip compressed data.
Contains the data type, bit precision, and array dimensions. The header is encoded through the arithmetic range coder as part of the compressed stream (not as raw bytes), matching the C++ fpzip wire format.
Fields§
§data_type: FpZipTypeThe floating-point type (float or double).
prec: u32Bit precision. Full precision for the type means lossless (32 for float, 64 for double).
nx: u32X dimension size.
ny: u32Y dimension size.
nz: u32Z dimension size.
nf: u32Number of fields (4th dimension).
Implementations§
Source§impl FpZipHeader
impl FpZipHeader
pub fn new(data_type: FpZipType, nx: u32, ny: u32, nz: u32, nf: u32) -> Self
Sourcepub fn total_elements(&self) -> u64
pub fn total_elements(&self) -> u64
Total number of elements.
Sourcepub fn write_to_encoder(&self, enc: &mut RangeEncoder)
pub fn write_to_encoder(&self, enc: &mut RangeEncoder)
Writes the header through the range encoder (C++ compatible format).
Sourcepub fn read_from_decoder(dec: &mut RangeDecoder<'_>) -> Result<Self>
pub fn read_from_decoder(dec: &mut RangeDecoder<'_>) -> Result<Self>
Reads the header through the range decoder (C++ compatible format).
Trait Implementations§
Source§impl Clone for FpZipHeader
impl Clone for FpZipHeader
Source§fn clone(&self) -> FpZipHeader
fn clone(&self) -> FpZipHeader
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 moreSource§impl Debug for FpZipHeader
impl Debug for FpZipHeader
Source§impl PartialEq for FpZipHeader
impl PartialEq for FpZipHeader
impl Copy for FpZipHeader
impl Eq for FpZipHeader
impl StructuralPartialEq for FpZipHeader
Auto Trait Implementations§
impl Freeze for FpZipHeader
impl RefUnwindSafe for FpZipHeader
impl Send for FpZipHeader
impl Sync for FpZipHeader
impl Unpin for FpZipHeader
impl UnsafeUnpin for FpZipHeader
impl UnwindSafe for FpZipHeader
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