I noticed the following comment:
Always returns {@link CompressionType}#RAW because I could not yet find a meaningful way to get information about the compression of a dataset.
To obtain compression information, we need to perform the following steps:
-
Obtain Dataset Creation Property List (DCPL) from the dataset
-
Query the DCPL for the number of filters
-
Query the DCPL for each filter by iterating over the filter index
-
Alternatively, query the DCPL for known compression filters
With JHDF5 19.04, it should be easier to access this API. However, we may need to perform the HDF5 access hack as in bigdataviewer-core:
https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/export/HDF5AccessHack.java
I noticed the following comment:
To obtain compression information, we need to perform the following steps:
Obtain Dataset Creation Property List (DCPL) from the dataset
C: https://portal.hdfgroup.org/display/HDF5/H5D_GET_CREATE_PLIST
Java: https://bitbucket.hdfgroup.org/pages/HDFFV/hdf5doc/master/browse/html/javadoc/hdf/hdf5lib/H5.html#H5Dget_create_plist-long-
Query the DCPL for the number of filters
C: https://portal.hdfgroup.org/display/HDF5/H5P_GET_NFILTERS
Java: https://bitbucket.hdfgroup.org/pages/HDFFV/hdf5doc/master/browse/html/javadoc/hdf/hdf5lib/H5.html#H5Pget_nfilters-long-
Query the DCPL for each filter by iterating over the filter index
C: https://portal.hdfgroup.org/display/HDF5/H5P_GET_FILTER
Java: https://bitbucket.hdfgroup.org/pages/HDFFV/hdf5doc/master/browse/html/javadoc/hdf/hdf5lib/H5.html#H5Pget_filter-long-int-int:A-long:A-int:A-long-java.lang.String:A-int:A-
Alternatively, query the DCPL for known compression filters
C: https://portal.hdfgroup.org/display/HDF5/H5P_GET_FILTER_BY_ID
Java: https://bitbucket.hdfgroup.org/pages/HDFFV/hdf5doc/master/browse/html/javadoc/hdf/hdf5lib/H5.html#H5Pget_filter_by_id2-long-long-int:A-long:A-int:A-long-java.lang.String:A-int:A-
With JHDF5 19.04, it should be easier to access this API. However, we may need to perform the HDF5 access hack as in bigdataviewer-core:
https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/export/HDF5AccessHack.java