Skip to content

Zarr forces compression even when explicitly disabled #1090

Open
@ptallada

Description

@ptallada

Minimal, reproducible code sample, a copy-pastable example if possible

import zarr

zeros = zarr.zeros((262144,), chunks=32*1024, dtype='f4', compressor=None)
print(zeros.compressor) # None

g = zarr.open_group('test.zarr', mode='w')
g['zeros'] = zeros
print(g['zeros'].compressor ) # Blosc(cname='lz4', clevel=5, shuffle=SHUFFLE, blocksize=0) ???

Problem description

Arrays created with no compression get compressed when added to a group.
A workaround is to set zarr.storage.default_compressor = None, but that affects all arrays.
I've been looking through the documentation and couldn't find any other way :/

Seems that here, compressor value is ignored as array is recreated:

z = create(**kwargs)

Version and installation information

  • zarr 2.12.0
  • numcodecs 0.10.0
  • python 3.9.9
  • GNU/Linux CentOS 7.8
  • Installed via pip into a venv

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssue could use help from someone with familiarity on the topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions