Metadata-Version: 2.2
Name: wavcomp
Version: 0.1.0
Summary: Compress data into WAV files
Author: WavComp
License: MIT
Project-URL: Source, https://github.com/example/wavcomp
Keywords: wav,steganography,covert,compression,audio,ofdm,qam
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20
Provides-Extra: crypto
Requires-Dist: cryptography>=3.0; extra == "crypto"

> **WavComp** — Compress data into WAV files.

WavComp is a Python library that takes arbitrary data (text or binary) and stores it inside a standard WAV audio file. The output sounds like white noise and can be used for compression or covert transfer.

## Features

- Compress text or binary data into a WAV file
- Optional zlib/bz2/lzma compression presets
- Optional password encryption
- Split large files into numbered WAV volumes (`cover.001.wav`, `cover.002.wav`, ...)
- Recover data exactly via `encode` / `decode` interface

## Installation

```bash
pip install wavcomp
```

## Quick Start

```python
from wavcomp import WavComp

wc = WavComp()

# Compress data into a WAV byte stream
with open("plain.txt", "rb") as f:
    data = f.read()
wav_bytes = wc.encode(data)

with open("cover.wav", "wb") as f:
    f.write(wav_bytes)

# Recover the original data
with open("cover.wav", "rb") as f:
    recovered = wc.decode(f.read())

assert recovered == data
```

## Command Line

```bash
# Single WAV output
wavcomp encode secret.txt cover.wav -p mypass
wavcomp decode cover.wav recovered.txt -p mypass

# Split into multiple WAV volumes, 1 MB each
wavcomp encode large.bin cover -k 1M -p mypass
wavcomp decode cover recovered.bin -p mypass
```

Chunk size suffixes: `K`, `M`, `G` (e.g. `-k 10K`, `-k 5M`, `-k 1G`).

## Compression Presets

```python
WavComp(compression="fast")   # zlib level 1, fastest
WavComp(compression="normal") # zlib level 6
WavComp(compression="best")   # zlib level 9, default
WavComp(compression="ultra")  # lzma, best ratio but slower
WavComp(compression=5)        # custom zlib level 0-9
```

## Split Output

When `-k` is used on the command line, each chunk is written to its own WAV file. This is useful for splitting large payloads into smaller files.

```bash
wavcomp encode large.bin cover -k 1M
# creates cover.001.wav, cover.002.wav, ...
```

Python API:

```python
wc = WavComp(chunk_size=1024 * 1024)
paths = wc.encode_split(data, "cover")
recovered = wc.decode_files(paths)
```

## Notes

- Designed for file-to-file transfer. The output WAV sounds like noise.
- Encryption uses a fixed salt, suitable for general use only.
- Modulation parameters must match between encode and decode.

## License

MIT
