Shirou Maruyama, M. Takeda, Masaya Nakahara, H. Sakamoto
{"title":"An Online Algorithm for Lightweight Grammar-Based Compression","authors":"Shirou Maruyama, M. Takeda, Masaya Nakahara, H. Sakamoto","doi":"10.1109/CCP.2011.40","DOIUrl":null,"url":null,"abstract":"Grammar-based compression is a well-studied technique for constructing a small context-free grammar (CFG) uniquely deriving a given text. In this paper, we present an online algorithm for lightweight grammar-based compression. Our algorithm is based on the LCA algorithm [Sakamoto et al. 2004]which guarantees nearly optimum compression ratio and space. LCA, however, is an offline algorithm and requires external space to save space consumption. Therefore, we present its online version which inherits most characteristics of the original LCA. Our algorithm guarantees $O(\\log^2 n)$-approximation ratio for an optimum grammar size, and all work is carried out on a main memory space which is bounded by the output size. In addition, we propose more practical encoding based on parentheses representation of a binary tree. Experimental results for repetitive texts demonstrate that our algorithm achieves effective compression compared to other practical compressors and the space consumption of our algorithm is smaller than the input text size.","PeriodicalId":167131,"journal":{"name":"2011 First International Conference on Data Compression, Communications and Processing","volume":"79 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2011-06-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"44","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2011 First International Conference on Data Compression, Communications and Processing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CCP.2011.40","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 44
Abstract
Grammar-based compression is a well-studied technique for constructing a small context-free grammar (CFG) uniquely deriving a given text. In this paper, we present an online algorithm for lightweight grammar-based compression. Our algorithm is based on the LCA algorithm [Sakamoto et al. 2004]which guarantees nearly optimum compression ratio and space. LCA, however, is an offline algorithm and requires external space to save space consumption. Therefore, we present its online version which inherits most characteristics of the original LCA. Our algorithm guarantees $O(\log^2 n)$-approximation ratio for an optimum grammar size, and all work is carried out on a main memory space which is bounded by the output size. In addition, we propose more practical encoding based on parentheses representation of a binary tree. Experimental results for repetitive texts demonstrate that our algorithm achieves effective compression compared to other practical compressors and the space consumption of our algorithm is smaller than the input text size.
基于语法的压缩是一种经过充分研究的技术,用于构造一个小型的上下文无关语法(CFG),惟一地派生给定的文本。本文提出了一种基于语法的在线轻量级压缩算法。我们的算法基于LCA算法[Sakamoto et al. 2004],它保证了近乎最佳的压缩比和空间。而LCA算法是一种离线算法,需要外部空间来节省空间消耗。因此,我们提出了它的在线版本,它继承了原始LCA的大部分特征。我们的算法保证$O(\log^2 n)$-近似比率为最佳语法大小,并且所有工作都在由输出大小限定的主内存空间上进行。此外,我们提出了基于二叉树的括号表示的更实用的编码方法。实验结果表明,与其他实用压缩器相比,我们的算法在重复文本的压缩中取得了有效的压缩效果,并且我们的算法占用的空间小于输入文本的大小。