This article is
- freely available
An Online Algorithm for Lightweight Grammar-Based Compression
Department of Informatics, Kyushu University, 744 Motooka Nishi-ku Fukuoka-shi, Fukuoka, Japan
Graduate School of Computer Science and Systems Engineering, Kyushu Institute of Technology,680-4 Kawazu Iizuka-shi Fukuoka, Japan
* Author to whom correspondence should be addressed.
Received: 30 January 2012; in revised form: 26 March 2012 / Accepted: 28 March 2012 / Published: 10 April 2012
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: lossless compression; grammar-based compression; online algorithm; approximation algorithm
Article StatisticsClick here to load and display the download statistics.
Notes: Multiple requests from the same IP address are counted as one view.
Cite This Article
MDPI and ACS Style
Maruyama, S.; Sakamoto, H.; Takeda, M. An Online Algorithm for Lightweight Grammar-Based Compression. Algorithms 2012, 5, 214-235.
Maruyama S, Sakamoto H, Takeda M. An Online Algorithm for Lightweight Grammar-Based Compression. Algorithms. 2012; 5(2):214-235.
Maruyama, Shirou; Sakamoto, Hiroshi; Takeda, Masayuki. 2012. "An Online Algorithm for Lightweight Grammar-Based Compression." Algorithms 5, no. 2: 214-235.