Open watsaig opened 8 months ago
This would happen if the compressor is not available for blosc
. If one specifies --features blosc-src/lz4,blosc-src/zlib
one gets down to 19kB with the blosc-lz4 filter and 8kB with blosc-zlib.
It is unfortunate that we don't error on trying to apply the filter when it is not available, but instead skip it. Setting https://github.com/aldanor/hdf5-rust/blob/4a9b537f0c7ba3f75712ba240fe9ffeb1fd9447e/hdf5/src/hl/filters.rs#L472 to the mandatory flag would provide such a message
I see, thank you. I added blosc-src = { version = "0.3.0", features = ["lz4", "zlib", "zstd"] }
to Cargo.toml
to make it work. May I suggest adding this to the documentation of the blosc_
functions?
Agreed that an error would be great in this case, or maybe even a more in-depth function like blosc_available
that would return which of the blosc filters are available.
Creating a dataset with any of the
blosc
filters compiles and runs with no errors, but does not compress the data at all. If I uselzf
orszip
instead, the dataset is compressed as expected.Just to be clear, the filter does appear to be applied (looking at the output of
h5dump
), but there is no compression.Are there any external dependencies needed for blosc to work?
Here is a minimal example:
Cargo.toml:
The output is:
Using
szip
, the compressed file size is 12 kB.