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 handling
  • utils - Utility functions for string conversion and validation
  • file - RAII wrapper for HDF5 files with mount and SWMR support
  • dataspace - RAII wrapper for HDF5 dataspaces
  • datatype - RAII wrapper for HDF5 datatypes
  • dataset - RAII wrapper for HDF5 datasets with chunking and hyperslab support
  • group - RAII wrapper for HDF5 groups
  • attribute - RAII wrapper for HDF5 attributes
  • filter - Compression filter utilities (GZIP, SZIP, shuffle, etc.)
  • visitor - Iteration helpers for attributes, links, and objects
  • property - Property list management
  • link - Link operations (hard, soft, external)
  • h5object - Generic HDF5 object operations
  • packet_table - Packet table operations
  • dimension_scale - Dimension scale support
  • table - High-level table operations using H5TB
  • image - High-level image operations using H5IM
  • direct_chunk - Direct chunk I/O operations bypassing filters
  • reference - 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.