WavPack - numcodecs implementation
Numcodecs wrapper to the WavPack audio codec.
This implementation enables one to use WavPack as a compressor in Zarr.
Installation
pip install wavpack-numcodecs
Wheels are published for Linux (x86_64 and aarch64, glibc 2.17 or newer), macOS (arm64 and x86_64) and Windows (x86_64), for CPython 3.11 and later. Each wheel has WavPack built in, so nothing else needs installing.
Building from source
Where no wheel fits, pip builds the package from the source distribution, which needs a C compiler and CMake. The
build links a system WavPack (5.6.4 or newer) if pkg-config finds one, and otherwise compiles the copy of WavPack
included in the source distribution.
To build from a clone, fetch the WavPack submodule first:
git clone --recurse-submodules https://github.com/AllenNeuralDynamics/wavpack-numcodecs.git
cd wavpack-numcodecs
pip install .
The CMake option WAVPACK_NUMCODECS_WAVPACK chooses the WavPack to link:
| Value | Links |
|---|---|
AUTO (default) |
a system WavPack >= 5.6.4 found by pkg-config, otherwise the bundled one |
SYSTEM |
the system WavPack of any version, failing if there is none |
BUNDLED |
the bundled WavPack, which the published wheels use |
pip install . --config-settings=cmake.define.WAVPACK_NUMCODECS_WAVPACK=SYSTEM
Usage
This is a simple example on how to use the WavPackCodec with zarr:
from wavpack_numcodecs import WavPack
data = ... # any numpy array
# instantiate WavPack compressor
wv_compressor = WavPack(level=2, bps=None)
# v2
group = zarr.group()
z = group.create_dataset(name="wv_dset", data=data, compressor=wv_compressor)
# v3
zarr.config.set({"default_zarr_version": 3})
group = zarr.group()
z = group.create_array(name="wv_dset3", data=data, serializer=wv_compressor)
data_read = z[:]
Available **kwargs can be browsed with: WavPack?
NOTE 1: In order to reload in zarr an array saved with the
WavPack, you just need to have thewavpack_numcodecspackage installed.
NOTE 2: The Zarr v3 implementation is an
ArrayBytesCodec. Thezarr.create_arrayfunction only supportsArrayArrayCodecobjects forfiltersandBytesBytesCodecsforcompressors. Hence, we need to use theWavPackcodec as aserializer, which is expected to be anArrayBytesCodecobject.
Developers guide
The extension modules are built with scikit-build-core and CMake from the
Cython sources in src/wavpack_numcodecs. WavPack is pinned as the git submodule extern/wavpack.
Run the tests against a local build, and the linters, with:
uv run pytest
uv run ruff format
uv run ruff check
uv run codespell
uv run interrogate -v
CI runs the same linters before it builds anything.
Upgrading WavPack
Dependabot proposes new WavPack releases as submodule bumps. To upgrade by hand:
git -C extern/wavpack fetch --tags
git -C extern/wavpack checkout <new tag>
git add extern/wavpack
Making a release
Update the version in pyproject.toml and push a tag. The Build, test and publish workflow builds the sdist and
the wheels, tests them, and uploads them to PyPI.
Metadata
Release files for wavpack-numcodecs 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wavpack_numcodecs-0.3.3.tar.gz | 983.7 kB | Without provenance | Details for wavpack_numcodecs-0.3.3.tar.gz |
Built distributions (wheels)
Total release size: 1.7 MB
Release files / wavpack_numcodecs-0.3.3.tar.gz
| Download URL | wavpack_numcodecs-0.3.3.tar.gz |
|---|---|
| Size | 983.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5fa1f7c81e4da16a9d85707f5bef56d2c29d6f081aa092e207d36eb2d7da09c
|
|
BLAKE2b-256 checksum How to use checksums |
e5992f5e60a962b8bb119d3b389c5143985ea7abe1737704338d63bca223d4f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / wavpack_numcodecs-0.3.3-cp311-abi3-win_amd64.whl
| Download URL | wavpack_numcodecs-0.3.3-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 131.4 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
29b3dd347c6a63b6d3f97c0783947fedb313eb21860d3bc88691bae88a355cb5
|
|
BLAKE2b-256 checksum How to use checksums |
51ddac8ef60a09601563cded1277c870dd0b6bc169f1f7ab93a3f91e19541b55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / wavpack_numcodecs-0.3.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | wavpack_numcodecs-0.3.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 172.5 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8abe2566503521a48df5363c6b690c5a51116686012f46c9a4be02e487aaddea
|
|
BLAKE2b-256 checksum How to use checksums |
f139a3327f6be8fafa3f42845c547db22112bc8692243a1e70285d5b59f955b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / wavpack_numcodecs-0.3.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | wavpack_numcodecs-0.3.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 164.4 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0e1c619aaf94038d179209d382558f1f512690b39207ed33af3e5b89400b2c4d
|
|
BLAKE2b-256 checksum How to use checksums |
5b894a2419b3dbdf6c1dbae26fcd17bb0cd3a0be6f9e69be74c0de9294f358db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / wavpack_numcodecs-0.3.3-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | wavpack_numcodecs-0.3.3-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 140.0 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0755dbd43f46db96aaaef09c731287af84c560ab0b0e4a2539de949f3d798b84
|
|
BLAKE2b-256 checksum How to use checksums |
e079a569e6ba4bd00819d7b3f239005c6a5fe519a336b9eb3e7c8f16c09e0d06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / wavpack_numcodecs-0.3.3-cp311-abi3-macosx_10_9_x86_64.whl
| Download URL | wavpack_numcodecs-0.3.3-cp311-abi3-macosx_10_9_x86_64.whl |
|---|---|
| Size | 140.5 kB |
| Tags | CPython 3.11 abi3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
c5070c661295e72af4608eead1332583f2c36a27fabb298ca6e612e9d0179a64
|
|
BLAKE2b-256 checksum How to use checksums |
9b7ded8ab1605d8f0e92b399d13ac80c89020f703cb3c063bc16b3cc26178b1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for wavpack-numcodecs 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.