Skip to main content

Numcodecs implementation of FLAC audio codec.

Project description

PyPI version tests

FLAC - numcodecs implementation

Numcodecs wrapper to the FLAC audio codec using pyFLAC.

This implementation enables one to use FLAC as a compressor in Zarr.

Installation

Install via pip:

pip install flac-numcodecs

Or from sources:

git clone https://github.com/AllenNeuralDynamics/flac-numcodecs.git
cd flac-numcodecs
pip install .

Usage

This is a simple example on how to use the Flac codec with zarr:

from flac_numcodecs import Flac

data = ... # any numpy array

# instantiate Flac compressor
flac_compressor = Flac(level=5)

z = zarr.array(data, compressor=flac_compressor)

data_read = z[:]

Available **kwargs can be browsed with: Flac?

NOTE: In order to reload in zarr an array saved with the Flac, you just need to have the flac_numcodecs package installed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flac_numcodecs-0.1.2.tar.gz (5.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page