The Ahana Compression Protocol (ACP) is a multi-layer architecture that combines classical entropy coding with neural prediction models. Each layer targets a different data domain — and they all output the same universal .aarm container.
Each layer builds on the one below. Data is routed to the optimal pipeline based on content type, then compressed with the most effective codec available.
The foundation. Lossless byte-stream compression with zstd (levels 1–22), LZMA-9, and bzip2-9. Fractal self-similarity pass, SHA-256 integrity, adaptive mode for content-type routing. Default entropy level: 22.
Modes: lossless, lossy, smart, quantum, adaptive
Content-type detection via magic bytes, Shannon entropy, byte heuristics, and PCM detection. 14 content categories with optimal pipeline routing. Audio → bzip2-9 (+9.5 pp). Image/video → delta8 + LZMA-9 (+15.8 pp). Detection latency: <1 µs.
+6.0 pp aggregate improvement over single-pipeline
ByteTransformer → NeuralRangeCoder (64-bit integer range coder). Three model sizes: nano (3M params, 1.32 bpb), micro (26M, 1.22 bpb), small (133M, 1.33 bpb). Per-file LoRA fine-tuning via OnlineLearner.
84.04% savings on enwik8 (+9.31 pp vs v2)
BytePairTokenizer (4096 vocab) → TokenTransformer → NeuralTokenCoder. RoPE positional embeddings, BF16 AMP, label smoothing 0.05, KV-cache for O(n) per-token. Self-describing: BPE vocab embedded in every .aarm file.
87.97% savings on enwik8 (+13.24 pp vs v2) — approaching Shannon limit
DPCM delta tokenization of float tensors. WeightTransformer trained on diverse model corpus. Random tensor access via indexed .aarm container. Compress 14.2 GB models to 6.89 GB — 51.5% savings, zero quality loss.
Patent: ACP-PAT-002
Key-dependent vocab permutation + model weight XOR + HKDF block seeding. Wrong key yields random bytes — no decryption oracle. IND-CPA secure. Compression is authentication.
Patent: ACP-PAT-003
All numbers measured on standardized corpora. SHA-256 roundtrip verification on every test. Compared against industry-standard baselines.
| Dataset | AhanaAI | zstd-22 | Improvement |
|---|---|---|---|
| Text (enwik8, 100 MB) | 87.97% | 74.73% | +13.24 pp |
| Mixed aggregate (10 MB) | 63.3% | 57.3% | +6.0 pp |
| Code (Python) | 83.0% | 82.8% | +0.2 pp |
| Speech audio (PCM) | 35.1% | 27.3% | +7.8 pp |
| Music audio (PCM) | 49.8% | 40.3% | +9.5 pp |
| Raw image | 41.3% | 27.6% | +13.7 pp |
| Raw video | 71.5% | 55.7% | +15.8 pp |
All measurements are 100% lossless and SHA-256 verified. "pp" = percentage points. Adaptive routing results from March 2026 benchmark sprint. Text numbers use ACP v4 (nano, fast mode). Shannon theoretical limit for English text: ~87.5% (1.0 bpc).
Automatic content-type detection routes each file to its optimal compression pipeline — bzip2 for audio, delta+LZMA for images, neural coding for text. Detection overhead: <1 µs. All pipelines lossless.
Rotary positional embeddings enable KV-cache reuse during encoding — O(context_len) per token instead of O(context_len²). This is what makes streaming compression practical on GPU.
Every .aarm file embeds its own BPE tokenizer vocabulary. No external model files, no version mismatch, no configuration. The file is the codec.
OnlineLearner adapts the neural model to each file during compression. The LoRA weights are embedded in the .aarm container. Better prediction → fewer bits → higher savings.
Our arithmetic coder operates in integer arithmetic — no floating-point determinism issues. Sequential CDF computation guarantees perfect roundtrip on any hardware.
FP8 precision, torch.compile graph optimization, CUDA stream parallelism. Tuned for NVIDIA RTX 5090 architecture with 32 GB VRAM. Production-grade throughput.
| Patent | Title | Status |
|---|---|---|
| ACP-PAT-001 | BPE-Guided Neural Arithmetic Coding for Lossless Data Compression | Filed 2026-02-27 |
| ACP-PAT-002 | Neural Network Weight Compression via DPCM Token Streams | Filed 2026-02-27 |
| ACP-PAT-003 | Cryptographic Decompression Authentication (PUZZLE-AUTH) | Filed 2026-02-27 |
| ACP-PAT-004 | Unified Cross-Modal Lossless Compression | Filed 2026-02-27 |
| ACP-PAT-005 | Compressed Activation Buffer (CAB) for Layer-Streaming Inference | Filed 2026-02-27 |
Our compression API is approaching launch. Join early access to be among the first to integrate ACP into your infrastructure.
Get Early Access →