Search code examples
pythondatasetcompressionhdf5h5py

How to access HDF5 dataset with szip compression using h5py


As the title says, I need to know how to access the dataset of an HDF5 file that has szip compression using h5py. This is the error I get:

IOError: can't read data (Dataset: Read failed)

Does anyone have an idea of how to access this dataset using h5py?

Thanks


Solution

  • What system are your using to read the HDF5 file?
    the h5py docs say this about SZIP:

    • UNIX: if supplied with HDF5.
    • Windows: read-only

    So, if you are on Linux, you may need to update your HDF5 installation to add SZIP compression. Reference here:

    Supported h5py compression/processing filters