Prediction by partial matching
![]() | This article includes a list of general references, but it lacks sufficient corresponding inline citations. (November 2015) |
Prediction by partial matching (PPM) is an adaptive
Theory
Predictions are usually reduced to symbol rankings[clarification needed]. Each symbol (a letter, bit or any other amount of data) is ranked before it is compressed, and the ranking system determines the corresponding codeword (and therefore the compression rate). In many compression algorithms, the ranking is equivalent to probability mass function estimation. Given the previous letters (or given a context), each symbol is assigned with a probability. For instance, in arithmetic coding the symbols are ranked by their probabilities to appear after previous symbols, and the whole sequence is compressed into a single fraction that is computed according to these probabilities.
The number of previous symbols, n, determines the order of the PPM model which is denoted as PPM(n). Unbounded variants where the context has no length limitations also exist and are denoted as PPM*. If no prediction can be made based on all n context symbols, a prediction is attempted with n − 1 symbols. This process is repeated until a match is found or no more symbols remain in context. At that point a fixed prediction is made.
Much of the work in optimizing a PPM model is handling inputs that have not already occurred in the input stream. The obvious way to handle them is to create a "never-seen" symbol which triggers the
Implementation
PPM compression implementations vary greatly in other details. The actual symbol selection is usually recorded using
Published research on this family of algorithms can be found as far back as the mid-1980s. Software implementations were not popular until the early 1990s because PPM algorithms require a significant amount of
PPMd is a public domain implementation of PPMII (PPM with information inheritance) by Dmitry Shkarin which has undergone several incompatible revisions.
Attempts to improve PPM algorithms led to the PAQ series of data compression algorithms.
A PPM algorithm, rather than being used for compression, is used to increase the efficiency of user input in the alternate input method program Dasher.
See also
Sources
- Cleary, J.; Witten, I. (April 1984). "Data Compression Using Adaptive Coding and Partial String Matching". .
- Moffat, A. (November 1990). "Implementing the PPM data compression scheme". doi:10.1109/26.61469.
- Cleary, J. G.; Teahan, W. J.; Witten, I. H. (1997). "Unbounded length contexts for PPM". The Computer Journal. 40 (2_and_3). Oxford, England: Oxford University Press: 67–75. ISSN 0010-4620.
- C. Bloom, Solving the problems of context modeling.
- W.J. Teahan, Probability estimation for PPM, Original Source from archive.org.
- Schürmann, T.; Grassberger, P. (September 1996). "Entropy estimation of symbol sequences". Chaos. 6 (3): 414–427. S2CID 10090433.
References
- ^ "BMF, PPMd Всё о сжатии данных, изображений и видео". compression.ru (in Russian). NOTE: requires manually setting the "Cyrillic (Windows)" encoding in browser.
External links
![]() | This article's use of external links may not follow Wikipedia's policies or guidelines. (November 2015) |
- Suite of PPM compressors with benchmarks
- BICOM, a bijective PPM compressor Archived 2004-04-15 at the Wayback Machine
- "Arithmetic Coding + Statistical Modeling = Data Compression", Part 2
- (in Russian) PPMd compressor by Dmitri Shkarin
- PPM compression in C++ by René Puschinger