Primitive‑Compression: A Hierarchical Minimum Description Length Compressor for Event Streams
Authors/Creators
Description
We present Primitive‑Compression, a lossless, domain‑agnostic compressor for ordered, timestamped event streams. The algorithm builds a hierarchical grammar of the data by recursively partitioning the stream into chunks, modelling each chunk with a small set of template positions (centroids) and exact timing residuals, and encoding the result using a Minimum Description Length (MDL) objective. On three real‑world datasets—ECG heartbeat intervals (MIT‑BIH), musical onset times (Ballroom), and financial order‑book timestamps (LOBSTER)—Primitive‑Compression is compared against general‑purpose compressors (gzip, LZMA, bzip2) and delta‑encoding baselines. The method is particularly effective on complex, non‑periodic data such as financial trades, where it achieves 2–4× smaller compressed size than standard tools. The engine requires no training data, no labels, and no domain‑specific knowledge. Lossless reconstruction is guaranteed at the data’s native precision (empirical reconstruction error <10^{-15}). The source code is publicly available under the AGPLv3 license.
Files
Primitive Compression.pdf
Files
(216.4 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:606c3ff2738ead9dfb6f50df68233cc2
|
216.4 kB | Preview Download |
Additional details
Software
- Repository URL
- https://github.com/praisejamesx/primitive-compression
- Programming language
- Python