Every compressor has to bet on what the next byte will be. Zip bets on repeated strings. PNG bets on adjacent pixels. PPM — Prediction by Partial Matching — bets on the next character after the longest matching context it has ever seen, and it does so well that it held the record for pure text compression for almost two decades.
The insight is simple but powerful: text is not random. After the letters , , , the next character is probably a space. After , it is almost certainly . The longer the matching context, the stronger the prediction — and a strong prediction needs very few bits to encode the outcome.
PPM was introduced in 1984 by John Cleary and Ian Witten at the University of Waikato. They showed that blending predictions from contexts of length 0, 1, 2, 3 and beyond — and escaping gracefully when a long context has never been seen — lets a compressor outperform everything that had come before on natural language text.
The idea sits at the intersection of information theory, statistics, and algorithmic elegance: build a model of the source while you compress it, and always use the deepest context for which you have any evidence.
Comments
Loading comments...