HDF5.jl

repository·master·Indexed 19 days ago

https://github.com/juliaio/hdf5.jl

A Julia interface to the HDF5 library for efficient storage and access of scientific data. It provides high-level APIs for reading and writing files, support for Julia structs via H5T_COMPOUND, and integration with MPI.jl for parallel I/O. The library supports various compression filters including Blosc, Bzip2, LZ4, and Zstd, as well as virtual datasets and memory-mapped multithreaded reads for contiguous datasets.

Tokens
16.3K
Snippets
65
Records
100
Agent score
64%

What's inside HDF5.jl

  1. Use LZ4 compression with HDF5.jl via CodecLz4Ext

    master
    CodecLz4Ext provides the LZ4 filter implementation for HDF5.jl. It allows you to use LZ4 compression when writing HDF5 files by implementing the HDF5 registered filter ID 32004. This is useful for high-speed compression/decompression workflows within the Julia HDF5 ecosystem.
  2. Use the Blosc filter with HDF5.jl via H5Zblosc.jl

    master
    H5Zblosc.jl provides an implementation of the Blosc compression filter for use with HDF5.jl. It implements HDF5 filter ID 32001. This allows you to use Blosc compression when writing HDF5 files in Julia, which can significantly improve performance and reduce file size for certain data types.
  3. Use Zstd compression with HDF5.jl via H5Zzstd.jl

    master

    H5Zzstd.jl provides the ZStandard (Zstd) filter for HDF5 files in Julia, implementing the HDF5 ZStandard Filter 32015.

    Note on Package Status: This is a transitional package. The functionality is now implemented by CodecZstdExt, an extension package for HDF5 that automatically loads when CodecZstd.jl is loaded. Loading H5Zzstd.jl will trigger this extension because it depends on both HDF5.jl and CodecZstd.jl.

  4. Use the bitshuffle filter in HDF5.jl

    master
    The bitshuffle_jll_ext package provides the bitshuffle filter implementation for HDF5.jl. It implements HDF5 filter ID 32008 and supports optional integrated lz4 and zstd (de)compression. This allows for efficient data compression within HDF5 files using the bitshuffle algorithm.
  5. Use LZ4 compression with HDF5.jl via H5Zlz4.jl

    master
    H5Zlz4.jl provides the LZ4 compression filter for the HDF5.jl package in Julia. It implements the HDF5 registered filter ID 32004. Use this package to enable LZ4 compression when writing HDF5 files, which can offer high-speed compression/decompression for large datasets.
  6. Use Zstd compression with HDF5.jl via CodecZstdExt

    master
    The CodecZstdExt package provides the Zstd filter implementation for HDF5.jl. It allows you to use ZStandard compression (HDF5 Filter 32015) when writing HDF5 files in Julia. This extension is derived from H5Zzstd.jl and enables high-performance compression for HDF5 datasets.
  7. How to load MPI-enabled HDF5 correctly

    master

    To ensure parallel functionality is available, you must load MPI before HDF5 in your Julia code. This is required because HDF5.jl uses MPI.jl as a dependency that must be initialized first to enable parallel features.

    You can verify if your current HDF5 installation supports parallel I/O using HDF5.has_parallel().

    using MPI
    using HDF5
    
    @assert HDF5.has_parallel()
  8. Select data subsets using Hyperslabs

    master

    Hyperslabs allow you to select specific, non-contiguous, or regular sub-regions of a dataset for reading or writing. This is essential for efficient I/O when you only need a portion of a large dataset.

    Key components and functions:

    • BlockRange: A type used to define the range of elements in a selection.
    • select_hyperslab!(ds, selection): Selects a specific hyperslab within the dataspace ds using the provided selection.
    • get_regular_hyperslab(ds): Retrieves the current regular hyperslab selection from a dataspace.
    • is_selection_valid(ds): Checks if the current selection on the dataspace is valid.
    # Example conceptual usage
    using HDF5
    
    # Select a regular hyperslab
    # (Assuming 'selection' is a valid BlockRange or selection object)
    select_hyperslab!(ds, selection)
    
    # Verify the selection
    if is_selection_valid(ds)
        # Perform I/O on the selected subset
    end