PureHDF
A pure C# library without native dependencies that makes reading and writing of HDF5 files (groups, datasets, attributes, ...) very easy.
This library runs on all platforms (ARM, x86, x64) and operating systems (Linux, Windows, MacOS, Raspbian, etc) that are supported by the .NET ecosystem without special configuration.
The implemention follows the HDF5 File Format Specification (HDF5 1.10).
Please read the docs for samples and API documentation.
Version 1
The minimum supported target framework is .NET Standard 2.0 which includes
.NET Framework 4.6.1+.NET Core (all versions).NET 5+
Version 1 of PureHDF supports all .NET versions starting with .NET 4.7.2. No further updates are planned.
Version 2
The minimum supported target framework version is .NET 6.0+.
To keep the code base clean, version 2 of PureHDF targets active .NET versions only, which are .NET 6 and .NET 8 as of now (August 2024).
Version 3
The minimum supported target framework version is .NET 8.0+.
To keep the code base clean, version 3 of PureHDF targets active .NET versions only, which are .NET 8 and .NET 10 as of now (August 2026).
Installation
dotnet add package PureHDF
Feature overview
| Reading | Writing | Feature |
|---|---|---|
| ✓ | ✓ | generic API |
| ✓ | ✓ | easy filter access |
| ✓ | ✓ | hardware-accelerated filters |
| ✓ | ✓ | data slicing |
| ✓ | ✓ | multidimensional arrays |
| ✓ | ✓ | compound data |
| ✓ | ✓ | variable-length data |
| ✓ | - | async reading |
| ✓ | - | multithreading (^1) |
| ✓ | - | Amazon S3 access |
| ✓ | - | HSDS (^2) access |
Comparison Table
Overwhelmed by the number of different HDF 5 libraries? Here is a comparison table:
Note: The following table considers only projects listed on Nuget.org
| Name | Arch | Platform | Kind | Mode | Version | License | Maintainer | Comment |
|---|---|---|---|---|---|---|---|---|
| v1.10 | ||||||||
| PureHDF | all | all | managed | rw | 1.10.* | MIT | Apollo3zehn | |
| HDF5-CSharp | x86,x64 | Win,Lin,Mac | HL | rw | 1.10.6 | MIT | LiorBanai | |
| SciSharp.Keras.HDF5 | x86,x64 | Win,Lin,Mac | HL | rw | 1.10.5 | MIT | SciSharp | fork of HDF-CSharp |
| ILNumerics.IO.HDF5 | x64 | Win,Lin | HL | rw | ? | proprietary | IL_Numerics_GmbH | probably 1.10 |
| LiteHDF | x86,x64 | Win,Lin,Mac | HL | ro | 1.10.5 | MIT | silkfire | |
| hdflib | x86,x64 | Windows | HL | wo | 1.10.6 | MIT | bdebree | |
| Mbc.Hdf5Utils | x86,x64 | Win,Lin,Mac | HL | rw | 1.10.6 | Apache-2.0 | bqstony | |
| HDF.PInvoke | x86,x64 | Windows | bindings | rw | 1.8,1.10.6 | HDF5 | hdf,gheber | |
| HDF.PInvoke.1.10 | x86,x64 | Win,Lin,Mac | bindings | rw | 1.10.6 | HDF5 | hdf,Apollo3zehn | |
| HDF.PInvoke.NETStandard | x86,x64 | Win,Lin,Mac | bindings | rw | 1.10.5 | HDF5 | surban | |
| v1.8 | ||||||||
| HDF5DotNet.x64 | x64 | Windows | HL | rw | 1.8 | HDF5 | thieum | |
| HDF5DotNet.x86 | x86 | Windows | HL | rw | 1.8 | HDF5 | thieum | |
| sharpHDF | x64 | Windows | HL | rw | 1.8 | MIT | bengecko | |
| HDF.PInvoke | x86,x64 | Windows | bindings | rw | 1.8,1.10.6 | HDF5 | hdf,gheber | |
| hdf5-v120-complete | x86,x64 | Windows | native | rw | 1.8 | HDF5 | daniel.gracia | |
| hdf5-v120 | x86,x64 | Windows | native | rw | 1.8 | HDF5 | keen |
Abbreviations:
| Term | .NET API | Native dependencies |
|---|---|---|
managed |
high-level | none |
HL |
high-level | C-library |
bindings |
low-level | C-library |
native |
none | C-library |