Skip to content

Commit

Permalink
undo parameter renaming for compatibility with n5-blosc (#485)
Browse files Browse the repository at this point in the history
fix compatibility with n5-blosc

* n5-blosc expects the original blosc parameters including 'blocksize'
* add release-comment about n5-blosc patch
  • Loading branch information
axtimwalde authored Oct 18, 2019
1 parent 5385484 commit 9949654
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Upcoming Release
* Upgrade dependencies in the test matrices and resolve a
compatibility issue with testing against the Azure Storage
Emulator. By :user:`alimanfoo`; :issue:`468`, :issue:`467`.

* Do not rename Blosc parameters in n5 backend and add `blocksize` parameter,
compatible with n5-blosc.

.. _release_2.3.2:

Expand Down
13 changes: 6 additions & 7 deletions zarr/n5.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,10 @@ def compressor_config_to_n5(compressor_config):
RuntimeWarning
)

n5_config['codec'] = compressor_config['cname']
n5_config['level'] = compressor_config['clevel']
n5_config['cname'] = compressor_config['cname']
n5_config['clevel'] = compressor_config['clevel']
n5_config['shuffle'] = compressor_config['shuffle']
assert compressor_config['blocksize'] == 0, \
"blosc block size needs to be 0 for N5 containers."
n5_config['blocksize'] = compressor_config['blocksize']

elif codec_id == 'lzma':

Expand Down Expand Up @@ -475,10 +474,10 @@ def compressor_config_to_zarr(compressor_config):

elif codec_id == 'blosc':

zarr_config['cname'] = compressor_config['codec']
zarr_config['clevel'] = compressor_config['level']
zarr_config['cname'] = compressor_config['cname']
zarr_config['clevel'] = compressor_config['clevel']
zarr_config['shuffle'] = compressor_config['shuffle']
zarr_config['blocksize'] = 0
zarr_config['blocksize'] = compressor_config['blocksize']

elif codec_id == 'lzma':

Expand Down

0 comments on commit 9949654

Please sign in to comment.