diff --git a/tests/test_v3.py b/tests/test_v3.py index 5579830..e8e8430 100644 --- a/tests/test_v3.py +++ b/tests/test_v3.py @@ -63,7 +63,7 @@ def test_sharding( [ codecs.transpose_codec("F"), codecs.bytes_codec(), - codecs.blosc_codec(typesize=data.dtype.itemsize, cname="lz4"), + codecs.blosc_codec(cname="lz4"), ], index_location=index_location, ) @@ -516,7 +516,7 @@ def test_open_sharding(store: Store): [ codecs.transpose_codec("F"), codecs.bytes_codec(), - codecs.blosc_codec(typesize=4), + codecs.blosc_codec(), ], ) ], @@ -675,7 +675,7 @@ def test_write_partial_sharded_chunks(store: Store): chunk_shape=(10, 10), codecs=[ codecs.bytes_codec(), - codecs.blosc_codec(typesize=data.dtype.itemsize), + codecs.blosc_codec(), ], ) ], diff --git a/zarrita/codecs.py b/zarrita/codecs.py index 29d2f54..fb8f271 100644 --- a/zarrita/codecs.py +++ b/zarrita/codecs.py @@ -545,7 +545,7 @@ def compute_encoded_size(self, input_byte_length: int) -> int: def blosc_codec( - typesize: int, + typesize: int = 0, cname: Literal["lz4", "lz4hc", "blosclz", "zstd", "snappy", "zlib"] = "zstd", clevel: int = 5, shuffle: Literal["noshuffle", "shuffle", "bitshuffle"] = "noshuffle", diff --git a/zarrita/metadata.py b/zarrita/metadata.py index 34eacdd..60a270b 100644 --- a/zarrita/metadata.py +++ b/zarrita/metadata.py @@ -149,7 +149,7 @@ def encode_chunk_key(self, chunk_coords: ChunkCoords) -> str: @frozen class BloscCodecConfigurationMetadata: - typesize: int + typesize: int = 0 cname: Literal["lz4", "lz4hc", "blosclz", "zstd", "snappy", "zlib"] = "zstd" clevel: int = 5 shuffle: BloscShuffle = "noshuffle"