Skip to main content

ASDF support for various compression algorithms

CI Status

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.

Metadata

Release files for asdf-compression 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asdf-compression 0.1.0
File Size Uploaded
asdf_compression-0.1.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asdf-compression 0.1.0
File Interpreter ABI Platform
asdf_compression-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.5 kB

Release files / asdf_compression-0.1.0.tar.gz

Download URL asdf_compression-0.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
26b9fd449a11111b8982ec010c29ad15b1e34902c60cb854f22501ab657e58e1
BLAKE2b-256 checksum
How to use checksums
587c6e6b6137ad7d7145ae24bb6064dffbac5534c612927690b67a86595ef2c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.6

Release files / asdf_compression-0.1.0-py3-none-any.whl

Download URL asdf_compression-0.1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
357c7f9ea6d56f3bc24d2ed338976155aa23e1bee4735fed33101364d65182a3
BLAKE2b-256 checksum
How to use checksums
4cf2d05901b3fb2910ef7053d3495090ca8dfcefe3ed178a43e097e17e11f339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page