pub enum DataLayoutMessage {
Contiguous {
address: u64,
size: u64,
},
Compact {
data: Vec<u8>,
},
ChunkedV3 {
chunk_dims: Vec<u64>,
b_tree_address: u64,
},
ChunkedV4 {
version: u8,
flags: u8,
chunk_dims: Vec<u64>,
index_type: ChunkIndexType,
earray_params: Option<EarrayParams>,
farray_params: Option<FixedArrayParams>,
single_chunk_filter: Option<SingleChunkFilter>,
index_address: u64,
},
}Expand description
Data layout message payload.
Variants§
Contiguous
Contiguous storage — raw data in a single block.
Fields
Compact
Compact storage — raw data stored within the object header.
ChunkedV3
Version 3 chunked storage, indexed by a version-1 B-tree.
This is what libhdf5 / h5py writes for a chunked dataset created
with the default libver bounds.
Fields
ChunkedV4
Version 4 chunked storage. Version 5 shares this exact wire format — only the version byte differs — so both decode into this variant.
Fields
version: u8Message version byte: 4 or 5. Version 5 (libhdf5 2.0,
H5O_LAYOUT_VERSION_5) declares that the chunk index encodes
filtered-chunk sizes in a fixed sizeof_size-byte field instead
of the width derived from the chunk byte count, so a filter may
expand a chunk without overflowing the field. Readers older than
libhdf5 2.0 reject version 5.
index_type: ChunkIndexTypeType of chunk index structure.
earray_params: Option<EarrayParams>Extensible array parameters (present when index_type == ExtensibleArray).
farray_params: Option<FixedArrayParams>Fixed array parameters (present when index_type == FixedArray).
single_chunk_filter: Option<SingleChunkFilter>Filtered single-chunk parameters (present when index_type ==
SingleChunk and the layout’s filtered flag 0x02 is set).
Implementations§
Source§impl DataLayoutMessage
impl DataLayoutMessage
Sourcepub fn contiguous_unallocated(size: u64) -> Self
pub fn contiguous_unallocated(size: u64) -> Self
Contiguous layout with no data allocated yet.
Sourcepub fn contiguous(address: u64, size: u64) -> Self
pub fn contiguous(address: u64, size: u64) -> Self
Contiguous layout pointing to allocated data.
Sourcepub fn chunked_v3_btree_v1(chunk_dims: Vec<u64>, b_tree_address: u64) -> Self
pub fn chunked_v3_btree_v1(chunk_dims: Vec<u64>, b_tree_address: u64) -> Self
Version 3 chunked layout indexed by a version-1 B-tree.
chunk_dims must include the trailing element-size dimension.
Sourcepub fn chunked_v4_earray(
version: u8,
chunk_dims: Vec<u64>,
earray_params: EarrayParams,
index_address: u64,
) -> Self
pub fn chunked_v4_earray( version: u8, chunk_dims: Vec<u64>, earray_params: EarrayParams, index_address: u64, ) -> Self
Version 4 chunked layout with extensible array index.
chunk_dims should include the trailing element-size dimension.
For example, for a 2D dataset with chunk=(1,4) and element_size=8,
pass chunk_dims = [1, 4, 8].
Sourcepub fn chunked_v4_farray(
version: u8,
chunk_dims: Vec<u64>,
farray_params: FixedArrayParams,
index_address: u64,
) -> Self
pub fn chunked_v4_farray( version: u8, chunk_dims: Vec<u64>, farray_params: FixedArrayParams, index_address: u64, ) -> Self
Version 4 chunked layout with fixed array index.
chunk_dims should include the trailing element-size dimension.
Sourcepub fn chunked_v4_btree_v2(
version: u8,
chunk_dims: Vec<u64>,
index_address: u64,
) -> Self
pub fn chunked_v4_btree_v2( version: u8, chunk_dims: Vec<u64>, index_address: u64, ) -> Self
Version 4 chunked layout with B-tree v2 index.
chunk_dims should include the trailing element-size dimension.
Sourcepub fn chunked_v4_single(chunk_dims: Vec<u64>, index_address: u64) -> Self
pub fn chunked_v4_single(chunk_dims: Vec<u64>, index_address: u64) -> Self
Version 4 chunked layout with single-chunk index.
chunk_dims should include the trailing element-size dimension.
pub fn encode(&self, ctx: &FormatContext) -> Vec<u8> ⓘ
pub fn decode(buf: &[u8], ctx: &FormatContext) -> FormatResult<(Self, usize)>
Trait Implementations§
Source§impl Clone for DataLayoutMessage
impl Clone for DataLayoutMessage
Source§fn clone(&self) -> DataLayoutMessage
fn clone(&self) -> DataLayoutMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more