A new universal lossless source coding theory is presented. Within this theory, a lossless source code called a grammar based code first transforms the original data sequence to be compressed into a context free grammar, from which the original data sequence can be fully reconstructed by performing parallel substitutions, and then uses an arithmetic coding algorithm to compress the context free grammar of the corresponding sequence of parsed phrases. It is shown that if a grammar-based code transforms each data sequence into an irreducible context free grammar, then the grammar-based code is universal for the class of stationary, ergodic sources. Specific redundancy bounds are also given.
展开▼