mysquishy
"I shall call him Squishy and he shall be mine and he shall be my Squishy." — Dory
Change the compression of a zarr array in-place.
This works by loading the chunk bytes, decoding them, recoding them, and saving them. At the end, the .zarray file at the root is updated.
Note that this only works for single arrays: there should be a .zarray file at the root. It is left as an exercise for the reader to figure out how to recompress every array in a zarr group.
Contributions are very welcome.
⚠️ BAD SQUISHY! ⚠️
This is currently just a proof of concept and it will leave your zarr arrays in an inconsistent/broken state if it is interrupted! And/or there might be bugs. It makes no effort to account for missing keys, for example. As above, contributions are very welcome but in the meantime be careful! Make a tiny zarr example similar to your data and check that it works fine there before deploying it properly.
Usage
From Python:
nbytes_before, nbytes_after = mysquishy.squish('path/to/array.zarr')
From the command line:
mysquishy path/to/array.zarr
Metadata
Release files for mysquishy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mysquishy-0.2.0.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mysquishy-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / mysquishy-0.2.0.tar.gz
| Download URL | mysquishy-0.2.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8ea5b9534b7aa0f8b6acf06a888782d07d69b1c03c025137af8e2c9e12c6756
|
|
BLAKE2b-256 checksum How to use checksums |
038ae80203a432c950b395145db3d6109993723c8ab72e27e267456e0f7304dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.5
|
Release files / mysquishy-0.2.0-py3-none-any.whl
| Download URL | mysquishy-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
039ced1445ed6164ebd9a11782ee4a35fe14ad9914caa93c85b192b7f8344ffa
|
|
BLAKE2b-256 checksum How to use checksums |
894ec39571bb451823126bf2a223f9900d6931cb53da8d60f69ca2352c217d57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.5
|