⚡ ZAP Audio Codec

Zero Audible Psychoacoustic - Studio Reference Audio Codec

Version 1.0.0 • Open Source • 2025
< 280
kbps Bitrate
93-99%
Fidelity Score
70-85%
Compression
64-bit
Processing

🎵 Core Features

🧠 Perceptual Encoding

Advanced psychoacoustic principles preserve clarity and ambiance while removing inaudible components.

  • DCT-IV Transform with 2048-sample blocks
  • Frequency-dependent weighting (2-5 kHz focus)
  • Spectral scrubbing (10 Hz - 22 kHz)
  • Non-linear quantization (Power Law 0.85)

🎧 Smart Stereo

Intelligent Mid/Side encoding applied only when beneficial for compression and phase coherence.

  • Automatic stereo field analysis
  • Dual weighting system (95% side channel)
  • Phase-coherent processing
  • Spatial information preservation

🔊 Transparent Dynamics

Subtle transient shaping enhances punch and presence without audible artifacts.

  • Max 0.5% dynamic enhancement
  • Attack preservation
  • Pre-emphasis filtering (coef. 0.28)
  • DC blocker (IIR 0.9995)

⚙️ High Precision

64-bit internal processing ensures archival stability and numerical accuracy.

  • Multi-core parallelization (Rayon)
  • Deterministic output
  • Adaptive bitrate optimization
  • Zstd Ultra 21 compression

🔬 How It Works

1

Input Validation

Enforces lossless sources (WAV, FLAC, AIFF) and automatically rejects lossy formats (MP3, OGG, AAC) to prevent quality degradation.

2

Pre-Processing

Applies reflection padding for boundary handling, pre-emphasis filtering for high-frequency clarity, and subtle transient shaping for improved dynamics.

3

Stereo Analysis

Real-time evaluation determines if Mid/Side encoding is beneficial based on stereo field energy distribution and correlation.

4

DCT-IV Transform

Converts time-domain signal to frequency domain using sine-windowed DCT-IV with 50% overlap for optimal time-frequency resolution.

5

Psychoacoustic Quantization

Non-linear power law quantization with frequency-dependent weighting and temporal prediction reduces data while preserving perceptual quality.

6

Entropy Coding

Final compression using Zstandard Ultra level 21 achieves maximum size reduction while maintaining fast decompression.

📊 Technical Specifications

Parameter Value Purpose
Block Size 2048 samples Optimal frequency resolution
Hop Size 1024 samples (50%) Smooth reconstruction
Window Function Sine Time-frequency localization
Power Law Exponent 0.85 Non-linear quantization
Pre-Emphasis 0.28 High-frequency clarity
DC Blocker 0.9995 (IIR) Low-frequency drift removal
Target Bitrate < 280 kbps Studio-grade quality
Compression Zstd Ultra 21 Final binary packaging

⚖️ Format Comparison

Format Bitrate Quality Compression Use Case
WAV (PCM) 1411 kbps 100% (Lossless) 0% Archival, Production
FLAC ~800 kbps 100% (Lossless) ~40% Best for Archival
ZAP < 280 kbps ~95% (Transparent) 70-85% Experimental, High Quality
Opus 128-256 kbps ~92-96% 80-90% Modern, Versatile
AAC (256) 256 kbps ~90-94% ~80% Streaming, Apple
MP3 (320) 320 kbps ~88-92% ~75% Universal Compatibility
OGG Vorbis ~200 kbps ~85-90% ~85% Open Source, Gaming

Note: Quality percentages are approximate and subjective. ZAP is experimental and designed for specific use cases where psychoacoustic optimization matters. For true lossless archival, use FLAC. For broad compatibility, use MP3/AAC. For modern applications, consider Opus.

📦 What's Included

📀 ZAP Codec Binary

Complete encoder/decoder/player in a single executable. No installation required - just run and encode!

💻 Source Code

Full Rust source code with detailed comments. Build, modify, and learn from the implementation.

📚 Documentation

Comprehensive technical documentation (EN/DE) and user guides for quick start and advanced usage.

🎮 CLI Player

Built-in playback engine with real-time sample rate conversion and progress display.

⬇️ Download ZAP Codec

📥 Download Complete Bundle
Includes: Codec Binary • Source Code • Documentation (EN/DE) • README Files