Grammar-based code

Source: Wikipedia, the free encyclopedia.
nonterminal symbol; they were obtained from a gzip
-compression of the sentence.

Grammar-based codes or Grammar-based compression are

To compress a data sequence , a grammar-based code transforms into a context-free grammar . The problem of finding a smallest grammar for an input sequence (smallest grammar problem) is known to be NP-hard,[2] so many grammar-transform algorithms are proposed from theoretical and practical viewpoints. Generally, the produced grammar is further compressed by statistical encoders like arithmetic coding.

Examples and characteristics

The class of grammar-based codes is very broad. It includes block codes, the multilevel pattern matching (MPM) algorithm,[3] variations of the incremental parsing Lempel-Ziv code,[4] and many other new universal lossless compression algorithms. Grammar-based codes are universal in the sense that they can achieve asymptotically the

ergodic
source with a finite alphabet.

Practical algorithms

The compression programs of the following are available from external links.

See also

References

External links