Numcodecs wrapper to the WavPack audio codec.
This implementation enables one to use WavPack as a compressor in Zarr.
To install wavpack-numcodecs
on MacOS, you need to install wavpack
with brew
:
For Linux and Windows, the package comes with pre-built binaries of the most recent version Wavpack version.
On Windows, you need to have the "Microsoft C++ Build Tools" installed. You can download it and install it from here.
On Linux, if an existing wavpack
installation is found, the package will use it. Otherwise, it will use the pre-built binaries available in the wavpack_numcodecs/libraries
folder.
Important
The pre-built binaries for Linux are pre-compiled against glibc
libraries that come with Ubuntu LTS recent versions (2.35 for LTS 22.04 and 2.39 for LTS 24.04). If your system has a different version of glibc
, you need to install wavpack
manually with:
WAVPACK_VERSION=5.8.0 wget "https://www.wavpack.com/wavpack-${WAVPACK_VERSION}.tar.bz2" tar -xf wavpack-$WAVPACK_VERSION.tar.bz2 cd wavpack-$WAVPACK_VERSION ./configure sudo make install cd ..
Install via pip
:
pip install wavpack-numcodecs
Or from sources:
git clone https://github.com/AllenNeuralDynamics/wavpack-numcodecs.git
cd wavpack_numcodecs
pip install .
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)
z = zarr.array(data, compressor=wv_compressor)
data_read = z[:]
Available **kwargs
can be browsed with: WavPack?
NOTE: In order to reload in zarr an array saved with the WavPack
, you just need to have the wavpack_numcodecs
package installed.
To upgrade the WavPack installation, you need to:
src/wavpack_numcodecs/libraries
folder with the name of the version of the WavPack you are installing.windows-x86_32
and windows-x86_64
folders, respectievely..github/wavpack_latest_version.txt
file and set the LATEST_WAVPACK_VERSION
variable in the setup.py
to match the version of the WavPack you are installing.Build wavpack binaries
workflow in the Actions tab of the repository. This will automatically build the binaries for different Linux versions and make PRs with the changes to the main
branch.pyproject.toml
file and tag the repo to automatically make a new release.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4