Skip to content

Commit

Permalink
Fix blosc2 compressor number
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Dec 9, 2022
1 parent 541737f commit 5264e11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions doc/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ compression_opts: (0, 0, 0, 0, **compression level**, **filter**, **compression*
* 0: blosclz (default)
* 1: lz4
* 2: lz4hc
* 3: zlib
* 4: zstd
* 3: unused
* 4: zlib
* 5: zstd

By default the filter uses byte shuffle and blosclz.

Expand Down
4 changes: 2 additions & 2 deletions src/hdf5plugin/_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ class Blosc2(_FilterRefClass):
'blosclz': 0,
'lz4': 1,
'lz4hc': 2,
'zlib': 3,
'zstd': 4,
'zlib': 4,
'zstd': 5,
}

def __init__(self, cname='blosclz', clevel=5, filters=SHUFFLE):
Expand Down
4 changes: 3 additions & 1 deletion src/hdf5plugin/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ def testBlosc2(self):
tested_filters = (hdf5plugin.Blosc2.NOFILTER,
hdf5plugin.Blosc2.SHUFFLE,
hdf5plugin.Blosc2.BITSHUFFLE)
compress = 'blosclz', 'lz4', 'lz4hc', 'zlib', 'zstd'
compress = 'blosclz', 'lz4', 'lz4hc', 'unused', 'zlib', 'zstd'
for compression_id, cname in enumerate(compress):
if cname == 'unused':
continue
for filters in tested_filters:
for clevel in range(10):
with self.subTest(compression=cname,
Expand Down

0 comments on commit 5264e11

Please sign in to comment.