numcodecs icon indicating copy to clipboard operation
numcodecs copied to clipboard

Is Snappy algorithm available with Blosc?

Open paumillet opened this issue 2 years ago • 4 comments

Hello there,

I was just wondering if Snappy algorithm was available again with Blosc compressor?

From what I've read, it was temporarily unavailable because of c-blosc upgrade in version 0.9.0. But it's currently written in last version (numcodecs 0.12.1) docs of Blosc that cname parameter is:

A string naming one of the compression algorithms available within blosc, e.g., ‘zstd’, ‘blosclz’, ‘lz4’, ‘lz4hc’, ‘zlib’ or ‘snappy’

Also, it seems like Snappy is made available with last versions of c-blosc.

Despite all this, I can't find Snappy algorithm in the list provided by

numcodecs.blosc.list_compressors()

['blosclz', 'lz4', 'lz4hc', 'zlib', 'zstd']

Is there a problem with my installation or is Snappy not available? If so, when will it be available again?

  • Value of numcodecs.__version__ : '0.12.1'
  • Version of Python interpreter: Python 3.9.16
  • Operating system (Linux/Windows/Mac): Linux
  • How NumCodecs was installed : using pip into virtual environment

Thanks in advance for your answer!

paumillet avatar Dec 14 '23 19:12 paumillet

snappy is not currently included in https://github.com/Blosc/c-blosc/tree/main/internal-complibs which is where numcodecs would normally obtain the compression libs from.

mkitti avatar Dec 20 '23 07:12 mkitti

Ok, thanks for your reply!

paumillet avatar Dec 20 '23 08:12 paumillet

see https://github.com/zarr-developers/zarr-specs/issues/360. We should ensure that blosc is compiled with snappy. We should merge #704, declare snappy as a dependency, and ensure that blosc compiles with snappy support.

d-v-b avatar Sep 23 '25 16:09 d-v-b

conda-forge has been building blosc (v1) with snappy: https://github.com/conda-forge/blosc-feedstock/blob/c57a4e59b3cf26bb7c87a9950ff57e0c4ed1b7b3/recipe/meta.yaml#L25

mkitti avatar Sep 23 '25 17:09 mkitti