Skip to content

Conversation

@t20100
Copy link
Member

@t20100 t20100 commented Oct 24, 2025

This PR adds helpers to instantiate filter class from

  • Check stored cd_values for each filter (only tested for Bitshuffle and Blosc so far)
  • Missing filters: Sperr, SZ, SZ3, ZFP
  • Tests
  • Documentation
  • Check endianness issues with filter packing double or bits: Sperr, SZ, SZ3, ZFP
  • Check which versions of the filter are supported and raise an exception for unsupported version if the version is stored in the cd_values

Usage:

In [1]: import hdf5plugin
In [2]: hdf5plugin.from_filter_options(32001, (0, 0, 0, 0, 4, 1, 1))
Out[2]: <hdf5plugin._filters.Blosc at 0x7f718b30c6e0>
In [3]: hdf5plugin.from_filter_options(32008, (0, 2, 4, 0, 2))
Out[3]: <hdf5plugin._filters.Bitshuffle at 0x7f7188b9cda0>
In [4]: hdf5plugin.from_filter_options(32001, (0, 0, 0, 0, 10, 1, 1))
[...]
ValueError: clevel must be in the range [0, 9]

Related to #365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant