Documentation
¶
Overview ¶
Package hdf5 reads the HDF5 structures used by the open science centre’s strain files, following the HDF5 File Format Specification, version 3.0.
Supported files have a version 0 superblock with eight-byte offsets and lengths, version 1 object headers and continuations, and old-style groups using version 1 B-trees, symbol table nodes, and local name heaps.
Datasets and attributes may contain little-endian integers, IEEE binary32 and binary64 floats, and fixed- or variable-length strings. Storage may be contiguous or chunked; chunks may use deflate and Fletcher-32, whose checksum is verified.
Other features return errors. Errors explain unsupported structures, damaged data, or a missing HDF5 signature in words, with the address and specification section where applicable. Failed reads return no result.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File reads on demand from its io.ReaderAt, retaining the parsed superblock rather than copying the whole file.
func NewFile ¶
NewFile validates a reader and byte length as a supported HDF5 file. Negative sizes, missing signatures, and unsupported format features return an error and no File. Format errors identify the feature and its location.
func (*File) Attribute ¶
Attribute reads a named attribute from a group or dataset, such as Xspacing on strain/Strain. Missing paths or names return an error.
type Values ¶
type Values struct {
// contains filtered or unexported fields
}
Values holds a dataset or attribute’s shape and stored bytes, decoded into a requested value type on demand.
func (*Values) Floats ¶
Floats decodes floating-point elements in file order and rejects other element types.
func (*Values) Integers ¶
Integers decodes integer elements in file order and rejects other element types.