Expand description
Reference elements and the dataspace selections region references carry.
Two element layouts exist for the pre-1.12 reference kinds, both written by
h5py 3.x today (H5Tref.c):
H5R_OBJECT1 sizeof_addr bytes the target's object header address
H5R_DATASET_REGION1 sizeof_addr + 4 a global-heap id: collection
address then a u32 object indexThe heap object a region reference points at is the target’s object header
address followed by the serialized selection
(H5R__encode_token_region_compat), whose wire format lives in the H5S
serializers (H5S__hyper_serialize, H5S__point_serialize,
H5S__all_serialize, H5S__none_serialize).
The 1.12 kinds — H5R_OBJECT2, H5R_DATASET_REGION2 and H5R_ATTR, all
written as H5T_STD_REF — share one element layout instead
(H5T__ref_disk_getsize):
type (1) | flags (1) | encoded reference an H5R_OBJECT2 with no
external file, stored
inline
type (1) | flags (1) | size (4) | heap id everything else, whose
encoded reference is a
global-heap bloband the encoded reference itself is H5R__encode: a token (its length, then
the target’s object header address), then — when the flags carry
H5R_IS_EXTERNAL — the name of the file the target lives in, then the
serialized selection for a region and the attribute name for an attribute
reference.
Structs§
- Decoded
Reference - Everything
H5R__decoderecovers from an encoded reference: where the target is, and what is named there.
Enums§
- Reference
- One reference element, decoded and resolved against the file it came from.
- Reference
Element Image - What one reference element holds — the encode-side mirror of
RevisedElement, which is what a reader splits an element back into. - Reference
Target - What a reference names beyond the object its token points at.
- Revised
Element - Where a 1.12 element keeps its encoded reference.
Constants§
- REVISED_
BLOB_ TOKEN_ OFFSET - Where the object token sits inside a blob
encode_revised_blobbuilt: behind the one byte that gives its length.
Functions§
- decode_
object_ element - The address a
H5R_OBJECT1element names, orNonefor a null reference. - decode_
region_ element - The
(collection address, object index)aH5R_DATASET_REGION1element names, orNonewhen the element is a null reference. - decode_
region_ heap_ object - Split a region reference’s heap object into the target’s object header address and the selection over it.
- decode_
revised_ body - Decode an encoded 1.12 reference —
H5R__decodefrom the token onwards — into where its target is and what it names there, orNonewhen the token names no object. - decode_
revised_ element - Split a 1.12 reference element into its kind and the encoded reference.
- encode_
reference_ element - The image one reference element has, at the
sizeits datatype declares. - encode_
revised_ blob - The encoded reference a 1.12 blob holds, less the two-byte header the
element keeps —
H5R__encodefrom the token onwards, which is exactly whatdecode_revised_bodyreads back.