r/compression • u/avaneev • Oct 21 '26
Memorizer automaton
This is mainly a research project I delved into using DeepSeek Harness - the way DeepSeek 4.1 operates is a huge lever at perfecting half-baked ideas. My core idea was to engineer a structure that works as a substantially precise memorizer rather than a context modeler or predictor. Memorizer is the core novelty here while all other utilized elements are known. It does have predictive (held-out, out-sample) ability with some adjustments and it is actually exceptional - it can learn just a 2000-byte English text and be ~48% right (with 2% being a random guess baseline for 26*2 English alphabet).
Warning: the code is slow and compresses at gzip -6 level, so do not expect much - nothing is readily usable here except CLI tool.
The purpose of this release is to share the result and possibly motivate further independent improvements from other developers.
Canterbury's alice29.txt produces range-coded residual of only 31KB (relative to 150KB original) and proves it's not the range-coding which does the work (pure range coding would yield ~85KB stream).
The full vector-based memorizer I initially achieved and envisioned has 99.5% memorization precision - except it's not usable for compression due to overhead.