An Online Algorithm for Lightweight Grammar-Based Compression
Open Access
- 10 April 2012
- journal article
- research article
- Published by MDPI AG in Algorithms
- Vol. 5 (2) , 214-235
Abstract
Grammar-based compression is a well-studied technique to construct a context-free grammar (CFG) deriving a given text uniquely. In this work, we propose an online algorithm for grammar-based compression. Our algorithm guarantees O(log2 n)- approximation ratio for the minimum grammar size, where n is an input size, and it runs in input linear time and output linear space. In addition, we propose a practical encoding, which transforms a restricted CFG into a more compact representation. Experimental results by comparison with standard compressors demonstrate that our algorithm is especially effective for highly repetitive text.Keywords
This publication has 25 references indexed in Scilit:
- Efficient algorithms to compute compressed longest common substrings and compressed palindromesTheoretical Computer Science, 2009
- A fully linear-time approximation algorithm for grammar-based compressionJournal of Discrete Algorithms, 2005
- Application of Lempel–Ziv factorization to the approximation of grammar-based compressionTheoretical Computer Science, 2003
- Collage system: a unifying framework for compressed pattern matchingTheoretical Computer Science, 2003
- Off-line compression by greedy textual substitutionProceedings of the IEEE, 2000
- Off-line dictionary-based compressionProceedings of the IEEE, 2000
- Grammar-based codes: a new class of universal lossless source codesIEEE Transactions on Information Theory, 2000
- A Technique for High-Performance Data CompressionComputer, 1984
- Compression of individual sequences via variable-rate codingIEEE Transactions on Information Theory, 1978
- A universal algorithm for sequential data compressionIEEE Transactions on Information Theory, 1977