IO: Add SZIP compression to HDF5 snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
1664a37e10
commit
43ad4a7af3
@ -27,7 +27,7 @@ following features are already implemented:
|
||||
* data stored in an internal XML+binary or the HDF5 format,
|
||||
* data integrity of the XML+binary format guaranteed by the XXH64 or XXH3 hashes;
|
||||
* support for Zstandard, LZ4, and LZMA compressions in the XML+binary format,
|
||||
* support for Deflate, Zstandard, and ZFP compressions in the HDF5 format,
|
||||
* support for Deflate, SZIP, Zstandard, and ZFP compressions in the HDF5 format,
|
||||
* easy and consistend Python interface to read snapshots in both formats,
|
||||
* MPI parallelization,
|
||||
* completely written in Fortran 2008,
|
||||
@ -80,6 +80,7 @@ Requirements
|
||||
will need these libraries.
|
||||
* Deflate compression is natively supported in HDF5 libraries, however,
|
||||
optionally these compression formats are supported through filters:
|
||||
[SZIP](https://support.hdfgroup.org/doc_resource/SZIP/)
|
||||
[HDF5Plugin-Zstandard](https://github.com/gkowal/HDF5Plugin-Zstandard),
|
||||
[H5Z-ZFP](https://github.com/LLNL/H5Z-ZFP).
|
||||
|
||||
|
@ -124,7 +124,10 @@ module io
|
||||
#ifdef HDF5
|
||||
! supported compression types
|
||||
!
|
||||
integer, parameter :: H5Z_DEFLATE = 1, H5Z_ZFP = 32013, H5Z_ZSTANDARD = 32015
|
||||
integer, parameter :: H5Z_DEFLATE = 1
|
||||
integer, parameter :: H5Z_SZIP = 4
|
||||
integer, parameter :: H5Z_ZFP = 32013
|
||||
integer, parameter :: H5Z_ZSTANDARD = 32015
|
||||
|
||||
! used compression type and level
|
||||
!
|
||||
@ -329,6 +332,17 @@ module io
|
||||
call print_message(loc, &
|
||||
"Could not check if the filter is available!")
|
||||
end if
|
||||
case("szip")
|
||||
call h5zfilter_avail_f(H5Z_FILTER_SZIP_F, test, status)
|
||||
if (status == 0) then
|
||||
if (test) then
|
||||
hcformat = H5Z_SZIP
|
||||
call h5pset_szip_f(prp_id, 32, 32, status)
|
||||
end if
|
||||
else
|
||||
call print_message(loc, &
|
||||
"Could not check if the filter is available!")
|
||||
end if
|
||||
case("zstd", "zstandard")
|
||||
call h5zfilter_avail_f(H5Z_ZSTANDARD, test, status)
|
||||
if (status == 0) then
|
||||
@ -480,6 +494,8 @@ module io
|
||||
case(H5Z_DEFLATE)
|
||||
call print_parameter(verbose, "HDF5 compression", "deflate")
|
||||
call print_parameter(verbose, "compression level", hclevel)
|
||||
case(H5Z_SZIP)
|
||||
call print_parameter(verbose, "HDF5 compression", "szip")
|
||||
case(H5Z_ZSTANDARD)
|
||||
call print_parameter(verbose, "HDF5 compression", "zstd")
|
||||
call print_parameter(verbose, "compression level", hclevel)
|
||||
|
Loading…
x
Reference in New Issue
Block a user