Metadata-Version: 2.1
Name: qoa
Version: 0.1.0
Summary: A library for reading and writing QOA files
Home-page: https://github.com/HaxelWorks/qoa-python
Author: Axel Roijers
Author-email: haxelworks@gmail.com
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: File Formats
Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
Classifier: Topic :: System :: Archiving :: Compression
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cffi >=1.16.0
Requires-Dist: numpy >=1.26.0

# QOA-Python

## The Quite OK Audio Format for Fast, Lossy Compression

A  Python wrapper around [qoa](https://github.com/phoboslab/qoa) Written using the amazing CFFI library.

## Why?

- QOA is fast. It decodes audio 3x faster than Ogg-Vorbis, while offering better quality and compression (278 kbits/s for 44khz stereo) than ADPCM.
- QOA is simple. The reference en-/decoder fits in about 400 lines of C. The file format specification is a single page PDF.
- Multi-threaded - Cffi unlocks the GIL

## Install

```sh
pip install qoa
```

## Usage

You can use the `qoa` library to encode and decode audio files. Here's a basic example:

```python
import qoa

# Read an audio file
np_array = qoa.read('path/to/file')

# Write an audio file
qoa.write(np_array , 'path/to/file')

# Decode an audio file
buffer,shape = qoa.decode('path/to/file')

# Encode an audio file
ffi_buffer = qoa.encode(np_array)
```
