Asdf extension to support various compression algorithms
Project description
ASDF support for various compression algorithms
This packages includes a plugin for the Python library asdf to add support for reading and writing various compression algorithms including:
Installation
This plugin is not yet stable and released on PyPi.
To install all compression algorithms supported by asdf-compression, install using the all optional parameters.
$ pip install "asdf-compression[all] @ git+https://github.com/asdf-format/asdf-compression"
Or alternatively by cloning and installing this repository.
$ git clone https://github.com/asdf-format/asdf-compression
$ cd asdf-compression
$ pip install ".[all]"
If only a specific algorithm is needed, just that algorithm can be installed.
$ pip install ".[zstd]"
Or a subset can be selected
$ pip install ".[zstd,blsc]"
Usage
When installed asdf-compression will register any supported and available compression algorithms with asdf using the Compressor interface.
The following example shows saving an array with zstandard compression provided via asdf-compression.
import asdf, numpy as np
af = asdf.AsdfFile({"arr": np.arange(42)})
af.set_array_compression(af["arr"], "zstd")
af.write_to("test.asdf")
Testing
pytest is used for testing. Tests can be run (from the source checkout of this repository):
$ pytest
Contributing
We welcome feedback and contributions to this project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asdf_compression-0.1.0.tar.gz.
File metadata
- Download URL: asdf_compression-0.1.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26b9fd449a11111b8982ec010c29ad15b1e34902c60cb854f22501ab657e58e1
|
|
| MD5 |
8cd8b589e73f7c7842d672b8dc0b8f83
|
|
| BLAKE2b-256 |
587c6e6b6137ad7d7145ae24bb6064dffbac5534c612927690b67a86595ef2c2
|
File details
Details for the file asdf_compression-0.1.0-py3-none-any.whl.
File metadata
- Download URL: asdf_compression-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
357c7f9ea6d56f3bc24d2ed338976155aa23e1bee4735fed33101364d65182a3
|
|
| MD5 |
a0301cc22d37119c98a05131597339fa
|
|
| BLAKE2b-256 |
4cf2d05901b3fb2910ef7053d3495090ca8dfcefe3ed178a43e097e17e11f339
|