You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
I would like to ask whether there is a way to change the default filter of highfive to blosc, because the default filter,which is set to szip, is slow and my system has real-time requirements. I notice that the highfive code does not seem to support the setting of filter. Can it be implemented using the native HDF5 function ?
I spent some time clarifying the structure of PropertyList in HighFive and found it very easy to add filter on this basis.
First, I need to declare and implement the Blosc class in H5PropertyList.hpp and H5PropertyList_misc.hpp, respectively. Just like this:
Of course I need to link hdf5-blosc dynamic library files:
# root CMakeLists.txt# I install hdf5-blosc to the default pathset(blosc_filter_DIR /usr/local/lib/)
target_link_libraries(HighFiveINTERFACEblosc_filter)
target_link_directories(HighFiveINTERFACE/usr/local/include/)
Finally I can write with blosc-filter!
HighFive::DataSetCreateProps props;
props.add(HighFive::Chunking({4,4}));
props.add(HighFive::Blosc(4, 1, BLOSC_BLOSCLZ));
// create dataset and write with this properties!
Activity
LauZanMo commentedon Apr 14, 2024
I spent some time clarifying the structure of PropertyList in HighFive and found it very easy to add filter on this basis.
First, I need to declare and implement the Blosc class in H5PropertyList.hpp and H5PropertyList_misc.hpp, respectively. Just like this:
Then, as for the specific implementation function ‘detail::h5p_set_blosc’, I refer to the implementation of hdf5_blosc: #https://github.com/Blosc/hdf5-blosc/blob/master/src/example.c#L57 just like this:
Of course I need to link hdf5-blosc dynamic library files:
Finally I can write with blosc-filter!
HighFive::DataSetCreateProps props; props.add(HighFive::Chunking({4,4})); props.add(HighFive::Blosc(4, 1, BLOSC_BLOSCLZ)); // create dataset and write with this properties!alkino commentedon Apr 14, 2024
Do you think you can propose a PR with that? It looks exactly what you should do to add your own filter.
LauZanMo commentedon Apr 15, 2024
OK, I'll submit a PR soon.