Next Article in Journal / Special Issue
Content Sharing Graphs for Deduplication-Enabled Storage Systems
Previous Article in Journal
Finding All Solutions and Instances of Numberlink and Slitherlink by ZDDs
Previous Article in Special Issue
A Semi-Preemptive Computational Service System with Limited Resources and Dynamic Resource Ranking
Article Menu

Article Versions

Export Article

Open AccessArticle
Algorithms 2012, 5(2), 214-235; doi:10.3390/a5020214

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 / Revised: 26 March 2012 / Accepted: 28 March 2012 / Published: 10 April 2012
(This article belongs to the Special Issue Data Compression, Communication and Processing)
Download PDF [347 KB, uploaded 24 April 2012]


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 lossless compression; grammar-based compression; online algorithm; approximation algorithm
This is an open access article distributed under the Creative Commons Attribution License (CC BY 3.0).

Scifeed alert for new publications

Never miss any articles matching your research from any publisher
  • Get alerts for new papers matching your research
  • Find out the new papers from selected authors
  • Updated daily for 49'000+ journals and 6000+ publishers
  • Define your Scifeed now

SciFeed Share & 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.

Show more citation formats Show less citations formats

Related Articles

Article Metrics

Article Access Statistics



[Return to top]
Algorithms EISSN 1999-4893 Published by MDPI AG, Basel, Switzerland RSS E-Mail Table of Contents Alert
Back to Top