Appearance
cellpack::format::cpk::Superblock
Module contract · All interfaces
At a glance
pub struct Superblock {
pub page_size: u32,
pub dtype: Dtype,
pub source: SourceLayout,
pub n_rows: u64,
pub n_cols: u32,
pub n_chunks: u32,
pub chunk_rows: u32,
pub directory_offset: u64,
pub file_len: u64,
}Decoded superblock fields.
Fields and variants
page_size
page_size: u32Page size records were packed to, in bytes; a power of two in [512, 65536], which also aligns every chunk offset.
dtype
dtype: DtypeNumeric type of the stored values.
source
source: SourceLayoutLayout the matrix arrived in; records choose their own layout.
n_rows
n_rows: u64Rows of the whole matrix; the chunks’ row counts add up to it.
n_cols
n_cols: u32Columns of the whole matrix, i.e. the dims of every chunk.
n_chunks
n_chunks: u32Directory entries, one per chunk.
chunk_rows
chunk_rows: u32Rows per chunk the writer aimed for; early-ended and pre-packed chunks can have other row counts.
directory_offset
directory_offset: u64Byte offset of the directory from the start of the file.
file_len
file_len: u64End of the directory, which ends the file.
Member index
1 of 1 members
directory_lenBytes of the directory this superblock describes: n_chunks entries of ENTRY_LEN bytes each.
Methods and associated constants
directory_len
pub fn directory_len(&self) -> usizeBytes of the directory this superblock describes: n_chunks entries of ENTRY_LEN bytes each.
Implemented traits
impl Clone for Superblockimpl Debug for Superblockimpl PartialEq for SuperblockContract reference
See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.