Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Grammar-based
codes are compression algorithms based on the idea of constructing a
context-free grammar for the string to be compressed. Examples include
universal lossless data compression algorithms and SEQUITUR, among
others. To compress a data sequencex = x_1 cdots x_n, a grammar-based
code first transforms x into a context-free grammar G, and then uses an
arithmetic coding algorithm to compress the grammar G.The class of
grammar-based codes is very broad. It includes block codes, variations
of the incremental parsing Lempel-Ziv code , the multilevel pattern
matching (MPM) algorithm, and many other new universal lossless
compression algorithms.