ddn.data.hdf5
HDF5 High-Level D Wrapper Package
This package provides high-level, idiomatic D wrappers for HDF5 operations with RAII semantics, exception-based error handling, and D slice support.
The wrappers are built on top of the low-level bindings in ddn.lib.hdf5 and provide a more convenient and safer interface for D programmers.
Modules:
types- Wrapper-specific types, exceptions, and error handlingutils- Utility functions for string conversion and validationfile- RAII wrapper for HDF5 files with mount and SWMR supportdataspace- RAII wrapper for HDF5 dataspacesdatatype- RAII wrapper for HDF5 datatypesdataset- RAII wrapper for HDF5 datasets with chunking and hyperslab supportgroup- RAII wrapper for HDF5 groupsattribute- RAII wrapper for HDF5 attributesfilter- Compression filter utilities (GZIP, SZIP, shuffle, etc.)visitor- Iteration helpers for attributes, links, and objectsproperty- Property list managementlink- Link operations (hard, soft, external)h5object- Generic HDF5 object operationspacket_table- Packet table operationsdimension_scale- Dimension scale supporttable- High-level table operations using H5TBimage- High-level image operations using H5IMdirect_chunk- Direct chunk I/O operations bypassing filtersreference- HDF5 reference operations for objects, regions, and attributes
Example:
import ddn.data.hdf5;
// Create a new HDF5 file
auto file = File.create("example.h5");
// Create a dataspace for a 2D array
auto space = Dataspace.createSimple([100, 200]);
// Create a dataset with native double type
auto dtype = Datatype.nativeDouble();
auto dataset = Dataset.create(file.handle(), "mydata", dtype.handle(), space.handle());
// Write data
double[] data = new double[100 * 200];
dataset.write(data, dtype.handle());
// Use compression filters
if (Filter.isGzipAvailable()) {
// Enable GZIP compression on property list
}
// Iterate over file contents
visitObjects(file.handle(), (ObjectInfo info) {
writeln(info.name);
return true;
});License
BSD-3-Clause
No exported symbols.