Evolutionary Lossless Compression with GP-ZIP

Similar documents
Evolutionary Lossless Compression with GP-ZIP*

Data Compression. An overview of Compression. Multimedia Systems and Applications. Binary Image Compression. Binary Image Compression

So, what is data compression, and why do we need it?

THE RELATIVE EFFICIENCY OF DATA COMPRESSION BY LZW AND LZSS

Lossless Audio Coding based on Burrows Wheeler Transform and Run Length Encoding Algorithm

Lossless Compression of Breast Tomosynthesis Objects Maximize DICOM Transmission Speed and Review Performance and Minimize Storage Space

Research Article Does an Arithmetic Coding Followed by Run-length Coding Enhance the Compression Ratio?

1. Introduction. 2. Motivation and Problem Definition. Volume 8 Issue 2, February Susmita Mohapatra

Evolution of the Discrete Cosine Transform Using Genetic Programming

Image Compression for Mobile Devices using Prediction and Direct Coding Approach

A Fast Block sorting Algorithm for lossless Data Compression

VC 12/13 T16 Video Compression

Information Technology Department, PCCOE-Pimpri Chinchwad, College of Engineering, Pune, Maharashtra, India 2

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Data Compression. Guest lecture, SGDS Fall 2011

Santa Fe Trail Problem Solution Using Grammatical Evolution

COMPRESSION OF SMALL TEXT FILES

CHAPTER II LITERATURE REVIEW

Mutation in Compressed Encoding in Estimation of Distribution Algorithm

A Comprehensive Review of Data Compression Techniques

CS/COE 1501

Image Compression Algorithm and JPEG Standard

A New Compression Method Strictly for English Textual Data

ADAPTATION OF REPRESENTATION IN GP

LIPT-Derived Transform Methods Used in Lossless Compression of Text Files

LOSSLESS IMAGE COMPRESSION METHOD USING REVERSIBLE LOW CONTRAST MAPPING (RLCM)

Analysis of Parallelization Effects on Textual Data Compression

Optimized Compression and Decompression Software

Contents. Index... 11

Dynamic Clustering of Data with Modified K-Means Algorithm

IJSRD - International Journal for Scientific Research & Development Vol. 3, Issue 10, 2015 ISSN (online):

Multi-Objective Pipe Smoothing Genetic Algorithm For Water Distribution Network Design

DETERMINING MAXIMUM/MINIMUM VALUES FOR TWO- DIMENTIONAL MATHMATICLE FUNCTIONS USING RANDOM CREOSSOVER TECHNIQUES

EE-575 INFORMATION THEORY - SEM 092

CS/COE 1501

Adaptive Crossover in Genetic Algorithms Using Statistics Mechanism

A New Crossover Technique for Cartesian Genetic Programming

A New Method of Predictive-substitutional Data Compression

Lossless Compression Algorithms

Optimization of Association Rule Mining through Genetic Algorithm

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

A QUAD-TREE DECOMPOSITION APPROACH TO CARTOON IMAGE COMPRESSION. Yi-Chen Tsai, Ming-Sui Lee, Meiyin Shen and C.-C. Jay Kuo

Image Compression - An Overview Jagroop Singh 1

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Lecture 10 (Chapter 7) ZHU Yongxin, Winson

Unified VLSI Systolic Array Design for LZ Data Compression

Journal of Computer Engineering and Technology (IJCET), ISSN (Print), International Journal of Computer Engineering

The Effect of Non-Greedy Parsing in Ziv-Lempel Compression Methods

A Novel Image Compression Technique using Simple Arithmetic Addition

Evolutionary Computation. Chao Lan

A Comparative Study of Lossless Compression Algorithm on Text Data

Multimedia Networking ECE 599

Evolutionary Algorithms

Genetic Algorithm based Fractal Image Compression

WIRE/WIRELESS SENSOR NETWORKS USING K-RLE ALGORITHM FOR A LOW POWER DATA COMPRESSION

A Genetic Algorithm for Graph Matching using Graph Node Characteristics 1 2

Influence of the tape number on the optimized structural performance of locally reinforced composite structures

Using Arithmetic Coding for Reduction of Resulting Simulation Data Size on Massively Parallel GPGPUs

Research Article Path Planning Using a Hybrid Evolutionary Algorithm Based on Tree Structure Encoding

ISSN: [Keswani* et al., 7(1): January, 2018] Impact Factor: 4.116

G64PMM - Lecture 3.2. Analogue vs Digital. Analogue Media. Graphics & Still Image Representation

Genetic programming. Lecture Genetic Programming. LISP as a GP language. LISP structure. S-expressions

Removing Spatial Redundancy from Image by Using Variable Vertex Chain Code

7. Archiving and compressing 7.1 Introduction

Evolutionary Linkage Creation between Information Sources in P2P Networks

CS 493: Algorithms for Massive Data Sets Dictionary-based compression February 14, 2002 Scribe: Tony Wirth LZ77

EE67I Multimedia Communication Systems Lecture 4

Flexible Cache Cache for afor Database Management Management Systems Systems Radim Bača and David Bednář

Design and Implementation of a Data Compression Scheme: A Partial Matching Approach

A SIMPLE LOSSLESS COMPRESSION ALGORITHM IN WIRELESS SENSOR NETWORKS: AN APPLICATION OF SEISMIC DATA

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey

Evolutionary form design: the application of genetic algorithmic techniques to computer-aided product design

An On-line Variable Length Binary. Institute for Systems Research and. Institute for Advanced Computer Studies. University of Maryland

Genetic Algorithms Variations and Implementation Issues

Metaheuristic Optimization with Evolver, Genocop and OptQuest

CHAPTER 6 HYBRID AI BASED IMAGE CLASSIFICATION TECHNIQUES

HARDWARE IMPLEMENTATION OF LOSSLESS LZMA DATA COMPRESSION ALGORITHM

OPTIMIZATION OF LZW (LEMPEL-ZIV-WELCH) ALGORITHM TO REDUCE TIME COMPLEXITY FOR DICTIONARY CREATION IN ENCODING AND DECODING

ECE 499/599 Data Compression & Information Theory. Thinh Nguyen Oregon State University

A Classifier with the Function-based Decision Tree

Optimal Reactive Power Dispatch Using Hybrid Loop-Genetic Based Algorithm

Design of an Optimal Nearest Neighbor Classifier Using an Intelligent Genetic Algorithm

An Advanced Text Encryption & Compression System Based on ASCII Values & Arithmetic Encoding to Improve Data Security

Genetic Programming for Data Classification: Partitioning the Search Space

The Genetic Algorithm for finding the maxima of single-variable functions

Implementing a Statically Adaptive Software RAID System

AN EVOLUTIONARY APPROACH TO DISTANCE VECTOR ROUTING

Topological Machining Fixture Layout Synthesis Using Genetic Algorithms

Evolving Variable-Ordering Heuristics for Constrained Optimisation

Automatic Programming with Ant Colony Optimization

Reducing The De-linearization of Data Placement to Improve Deduplication Performance

Lossless compression II

Multi-threading technology and the challenges of meeting performance and power consumption demands for mobile applications

Encoding. A thesis submitted to the Graduate School of University of Cincinnati in

Image compression. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

Investigating the Application of Genetic Programming to Function Approximation

EVOLVING LEGO. Exploring the impact of alternative encodings on the performance of evolutionary algorithms. 1. Introduction

Data Storage. Slides derived from those available on the web site of the book: Computer Science: An Overview, 11 th Edition, by J.

Evolved Multi-resolution Transforms for Optimized Image Compression and Reconstruction under Quantization

A COMPRESSION TECHNIQUES IN DIGITAL IMAGE PROCESSING - REVIEW

Comparative Study on VQ with Simple GA and Ordain GA

Transcription:

Evolutionary Lossless Compression with GP-ZIP Ahmad Kattan and Riccardo Poli Abstract In this paper we propose a new approach for applying Genetic Programming to lossless data compression based on combining well-known lossless compression algorithms. The file to be compressed is divided into chunks of a predefined length, and GP is asked to find the best possible compression algorithm for each chunk in such a way to minimise the total length of the compressed file. This technique is referred to as GP-zip. The compression algorithms available to GP-zip (its function set) are: Arithmetic coding (AC), Lempel-Ziv-Welch (LZW), Unbounded Prediction by Partial Matching (PPMD), Run Length Encoding (RLE), and Boolean Minimization. In addition, two transformation techniques are available: Burrows-Wheeler Transformation (BWT) and Move to Front (MTF). In experimentation with this technique, we show that when the file to be compressed is composed of heterogeneous data fragments (as is the case, for example, in archive files), GP-zip is capable of achieving compression ratios that are superior to those obtained with well-known compression algorithms. I. INTRODUCTION One of the paradoxes of technology evolution is that despite the development of computers and the increasing need for storing information, there is a lack of development of compression techniques. As the evolution of computer systems progresses rapidly, the amount of stored information will increase at the same rate. Researchers in the compression field tend to develop algorithms that work with specific types of data, taking advantage of any available knowledge about the data. It is difficult to find a universal compression algorithm that performs well on any data type [1]. Two principles are commonly accepted in the field of data compression: a) there is no algorithm that is able to compress all the files even by 1 byte, and b) there are less than 1% of all files that can be compressed losslessly by 1 byte [1]. Consequently, the development of generic compression algorithms is attracting less attention. Nevertheless their importance should not be underestimated, as they are useful when the nature and regularities of a given data file is not predictable. For example, in archive systems, the users need to compress huge amounts of different data, such as text, music, pictures, video and so forth. A single universal compression model would be preferable in this case. We have mentioned that best compression can be achieved when applying a compression algorithm specialised for the type of data that need compressing. In this Ahmad Kattan is with the Department of Computing and Electronic Systems, University of Essex, Wivenhoe Park, Colchester CO4 3SQ, UK; (email: akatta@essex.ac.uk). Riccardo Poli is with the Department of Computing and Electronic Systems, University of Essex, Wivenhoe Park, Colchester CO4 3SQ, UK; (email: rpoli@essex.ac.uk). paper we investigate the idea of evolving programs that attempt to identify what is the best way of applying different compression algorithms to different parts of a data file so as to best match the nature of such data. The structure of this paper is as follows. In Section II some related work is briefly reviewed. Section III discusses our system, GP-zip, in detail. This is followed by experimental results with GP-zip in Section IV. Section V proposes a further improvement to GP-zip which significantly improves compression ratios. Finally, conclusive marks are given in Section VI. II. RELATED WORK Data compression requires highly specialized procedures. Therefore, evolving a data compression algorithm is not an easy task. Few attempts have been made to use of evolutionary algorithms to evolve data compression models. There are two main approaches for the use of evolutionary computations in data compression. The first is the use of genetic algorithms to find parameters for a compression algorithm with the aim of maximising the compression ratio. The second approach is the use of genetic programming (GP) for what is called programmatic compression [3]. Of the two, the latter is much more powerful, at least in principle, as was demonstrated by Nordin and Banzhaf who used GP to achieve lossy compression for images and sounds [3]. Others have also used genetic programming in developing compression models. For example, [4] used genetic programming for string compression. Fukunaga and Stechert [] developed a nonlinear predictive model to compress grey scale images. Parent and Nowe [] used genetic programming to reduce the entropy of the data. They evolved transformation programs in order to maximize compression ratios when applying the transformed data to lossless compression algorithms. III. GP-ZIP Over the past decade many techniques have been developed for lossless compression, each of which has their own particular advantages and disadvantages. Each performs well on the data domain that they are designed to work in. Unfortunately, no single compression algorithm exists that is reliable for all known data types. Here we investigate how to evolve a program that matches different parts of a data file with the best possible compression model for them. Our approach works as follows. We divide the given data file into chunks of a certain length and ask GP to identify the best possible compression technique for each chunk. The function set of GP-zip is composed of primitives that naturally fall into two categories. The first category contains the following five

compression algorithms: Arithmetic Coding (AC) [6], Lempel-Ziv-Welch LZW [7], unbounded Prediction by Partial Matching (PPMD) [8], Run Length Encoding (RLE) [9], and Boolean Minimization [1]. In the second category, two transformation techniques are included: Burrows- Wheeler Transformation (BWT) [11] and Move to Front (MTF) [1]. Since these are all very well-known techniques, we will not provide a detailed explanation of each of these compression and transformation algorithms here. We treat each member in the function set as a black box. Each compression function receives a stream of data as inputs and returns a (typically) smaller stream of compressed data as an output. Each transformation function receives a stream of data as input and returns a transformed stream of data as an output. So, this does not directly produce a compression. However often the transformed data are more compressible, and so, when passed to a compression algorithm in the function set, a better compression ratio is achieved In the following two subsections we provide further details on the system. A. Chunking The basic idea behind dividing files into chunks is the concept of divide and conquer. Each member function in the function set performs well when it works in the circumstances that it has been designed for. Dividing the given data into smaller chunks makes the creation and identification of such circumstances easier. The length of the possible chunks starts from bytes and increases up to 1 Mega byte in increments of bytes. Hence, the set of possible lengths for the chunks is {,,, 6.1MB}. The number of chunks is calculated, by dividing the file size by the chunk length. Note that the chunks are not allowed to be bigger than the size of the file itself. Moreover, the size of the file is added to the set of possible chunk lengths. This is to give GP-zip the freedom to choose whether to divide the file into smaller chunks as opposed to compressing the whole file as one single block. B. The approach As explained above, the function set is composed of five compression algorithms and two transformation algorithms. It is clear that we have 1 different possible ways of compressing each chunk. Namely, we can apply one of the five compression functions without any transformation of the data in a block, or we can precede the application of the compression function by one of two transformation functions. GP-zip randomly selects a chunk length from the set of possible lengths, and then applies relatively simple evolutionary operations. The system starts by initializing a population randomly. As exemplified in Figure 1, individuals represent a sequence of compression functions with or without transformation functions. High-fitness individuals are selected with a specific probability and are manipulated by crossover, mutation and reproduction operations. Fig 1: Individuals within a population After the system finds the best possible compression for the selected chunk-length, the system suggests another length for the chunks and the same process is iterated. Since testing all of the possible chunk lengths is very time consuming, GP-zip selects the new lengths by performing a form of binary search over the set of possible lengths. This is applied for the first time after the system has tested two chunk lengths. The third chunk length is chosen where, based on the results obtained with the first two chunk lengths, we would expect to obtain more promising results. Since the proposed system divides the data into chunks and finds the best possible compression model for them, it is necessary for the decompression process to know which chunk was compressed with which compression and transformation function. A header for the compressed files has been designed which provides this information for the decompression process. The size of this header is not fixed. However, there is an insignificant overhead in comparison with size of the original (uncompressed) file. It should be noted that the advantages of dividing the data into smaller chunks manifest themselves in the decompression stage. Firstly, the decompression process can easily decompress a section of the data without processing the entire file. Furthermore, the decompression process is faster than the compression since, in principle, GP-zip can send each chunk that needs decompressing to the operating system pipeline sequentially. IV. EXPERIMENTS Experiments have been conducted in order to investigate the performance of the proposed technique. The aim of these experiments is to measure the performance of GP-zip with different data types. The experiments covered three sets of data: i) an archive of English text files, ii) an archive of executable files, and iii) an archive file that include PDF, MP3, Excel sheet, and text files. The total sizes of the data sets are 4.7MB, 4.7MB and 1.43MB respectively. Both text files and executable files are available in [13]. There is no terminating condition for GP-zip. Therefore, GP-zip runs until it reaches the maximum number of generations. The experiments that are presented here were done using: Population of size. Maximum number of generations. One point crossover with probability of %. Mutation with probability %.

Reproduction with probability of % Tournament selection with tournament size. After applying GP-zip to the set of English text files and the set of executable files, the system always converged to solutions where each file is treated as a single contiguous chunk. Figures and 3 show how the compression ratios increase as the number of chunks in these files decrease. This is not too surprising since both executable files and plain text, statistically, have a very regular structure. However, when applying GP-zip to our third data set (an archive containing files of different types), the system found that dividing the file into a certain number of blocks provided best performance. (Figure 4 shows how the compression ratio varies with the number of chunks.) Naturally, this had to be expected as it is difficult to process the entire data set effectively using only one algorithm. 6 3 1 1 6 3 1 1 Text Files 86 18 74 7 71 69 1 No. of Blocks Fig : Number of block vs. compression for the text files. Exe Files 19 77 141 13 86 84 8 49 49 48 47 47 1 No. of blocks Fig 3: Number of block vs. compression for the executable files. 6 3 1 1 19 944 786 9 18 13 1 1 86 79 73 68 63 9 6 3 1 1 Archive File No. of Blocks 1 Fig 4: Number of block vs. compression for the archive file To evaluate the relative benefits of GP-zip in comparison to other widely used techniques, we compared the performance of GP-zip against the compression algorithms in the function set. Furthermore, bzip and WinRar, which are amongst the most popular compression algorithms in regular use, were included in the comparison. The results of the comparison are reported in Table I. In the first two data sets, the system decided to process the data as one big single block. Consequently, their compression ratio is based on the performance of one compression function in the function set (in fact, PPMD). So, here GP-zip cannot outperform existing algorithms. It did choose, however, a very good algorithm to do the compression, thereby resulting second best in both categories. In the heterogeneous data set, however, GP-zip beats all other algorithms by a very considerable margin. More precisely GP-zip provides an improvement of compression ratio of 1% or more over all others. This shows that there is great potential in an evolutionary approach to data compression. TABLE I PERFORMANCE COMPARISON Compression \ Files Exe Text Archive bzip 7.86% 77.88% 3.9% WinRar- Best 64.68% 81.4% 34.3% PPMD 61.84% 79.% 33.3% Boolean Minimization 11.4% 4.4% 3.78% LZW 3.% 6.47% 1.13% RLE -4.66% -11.33% -1.% AC.46% 37.77% 9.98% GP- zip 61.84% 79.% 43.% Although the proposed technique has achieved substantial compression ratio with heterogeneous files in comparison with the other techniques, it suffers from one major disadvantage. Running GP-zip is very time consuming (of

the order of a day per megabyte). The reason for this is that, each time GP-zip suggests a new chunk length, it executes a new GP run which consumes considerably time by itself. Therefore, most of time is spent searching for the best possible length for the blocks, rather than for choosing how to compress the data. V. GLUING In our experiments we saw that when compressing a sequence of continuous data of the same kind, a single model is better than dividing the sequence into smaller pieces. Why? At one level the answer is intuitive: since the data are all of the same kind, GP-zip just decided to use the best compression technique for those data. However, in principle, one might argue, GP-zip could have decided to use the same algorithm to compress every chunk of a data file thereby achieving the same result even when a file is divided up into many smaller elements. The fallacy of this argument resides in the fact, that most compression techniques require some header information to be stored (for future decompression) before the compression of the actual data starts. So, applying say PPMD to the N chunks of a file is more expensive (in the sense that it gives a lower compression ratio) than applying PPMD on the whole file. If evolution is working well, these repeated sequences will typically indicate that the data in the corresponding chunks are of similar (or at least compatible) type. This suggests that even better compression might be achieved by avoiding repeating the header information associated to PPMD or LZW in this example. Therefore, after GP-zip finds the best length for dividing up a given file into chunks, we try to glue together any continuous sequence of chunks that use the same functions. Gluing is the process of joining subsequence chunks to form bigger blocks, with the intention of processing them as one unit. Once we glue the chunks which are associated to the same compression and transformation functions, we have fewer chunks, which, on average, are of bigger size, leading to better compression. It should be noted that the gluing process happens only once after GP-zip has determined the length for chunks. Figure illustrates GP-zip s flowchart. Table II compares the performance of GP-zip on the heterogeneous data files with and without gluing. It is clear that gluing further improves the lead of GP-zip over other compression algorithms. Gluing the chunks not only improves the compression ratio, it also decreases the quantity of information stored within the file header. TABLE II GP-ZIP (GLUING) Compression/Files Archive bzip 3.9% WinRar- Best 34.3% PPMD 33.3% Boolean Minimization 3.78% LZW 1.13% RLE -1.% AC 9.98% GP- zip 43.% GP- zip (Glue) 49.49% Fig : GP-zip flowchart While this effect is particularly evident on homogeneous data, to a smaller scale this can manifest itself also when a data file is heterogeneous. It is possible, and in fact likely, that GP-zip chromosomes will contain repeated sequences of identical primitives, e.g.,.[ppmd][ppmd] [LZW][LZW][LZW] VI. CONCLUSION AND FUTURE WORK In the field of lossless compression it is very difficult to significantly improve on the already excellent performance provided by current algorithms. In this research we wanted to understand the benefits and limitation of combining existing lossless compression algorithms in a way that ensure the best possible match between the algorithm being used and the type of data it is applied to. While other compression algorithms attempt to used different techniques on the file to be compressed, and then settle for the one that provides the best performance, the system we have developed, GP-zip, goes further. It divides the data file into smaller chunks and attempts to identify what combination of compression algorithms provides the best performance.

Despite the simplicity of our current realization of this idea, the results obtained by GP-zip have been remarkable, with GP-zip significantly outperforming other compression algorithms on heterogeneous files and never being too far from the best with other types of data. Furthermore, a significant improvement has been achieved when gluing sequences of identical chunks. In future research, we will concentrate on this particular aspect of GP-zip as further substantial improvements can be expected. In addition to providing better compression (in some cases), the division of data files into chunks presents the additional advantage that, in the decompression process, one can decompress a section of the data without processing the entire file. This is particularly useful, for example, if the data are decompressed for streaming purposes (such as music and video files). Also, the decompression process is faster than the compression one, as GP-zip can send each compressed chunk to the operating system pipeline sequentially. Although the proposed technique has achieved substantial improvements in compression ratios for heterogeneous files in comparison with other techniques, it suffers from one major disadvantage. The process of GP-zip is computationally expensive. In future research we will also concentrate on this aspect of GP-zip. Our results are encouraging, in the sense that significant improvements have been achieved. There are many directions where we can further improve the performance of GP-zip. These range, for example, from the simple extension of the set of compression and transformation functions available in the primitive set to the open ended evolution of the compression algorithm to be performed every time a file is accessed. We will explore these avenues in future research. [1] A. Kattan, Universal Lossless Data Compression with built in Encryption. Master Thesis, University of Essex 6. [11] M. Burrows and D. J. Wheeler, A block-sorting lossless data compression algorithm, SRC, Number 14, 94. [1] Z. Arnavut, Move-to-Front and Inversion Coding, DCC: Data Compression Conference, IEEE Computer Society TCC,. [13] ACT Archive Compression Test [cited December 7]; Available from: http://compression.ca/act/act-win.html REFERENCES [1] I. M. Pu, Fundamental Data Compression, HB, ISBN-13: 978-- 76-631-66. Chapter 1 [] J. Parent and A. Nowe, Evolving Compression Preprocessors with Genetic Programming, GECCO : Proceedings of the Genetic and Evolutionary Computation Conference, pp. 861-867, Morgan Kaufmann Publishers, 9-13 July. [3] P. Nordin and W. Banzhaf, Programmatic Compression of Images and Sound, Genetic Programming 96: Proceedings of the First Annual Conference, pp. 3-3, MIT Press, 8-31 July 96. [4] I. De Falco and A. Iazzetta and E. Tarantino and A. Della Cioppa and G. Trautteur, A Kolmogorov Complexity-based Genetic Programming tool for string compression, Proceedings of the Genetic and Evolutionary Computation Conference (GECCO-), pp. 47-434, Morgan Kaufmann, 1-1 July. [] A. Fukunaga and A. Stechert, Evolving Nonlinear Predictive Models for Lossless Image Compression with Genetic Programming, Genetic Programming 98: Proceedings of the Third Annual Conference, pp. -1, Morgan Kaufmann, - July 98. [6] I. Witten and R. Neal and J. Cleary, Arithmetic coding for data compression, Communications of the ACM, Vol., pp. -41, 87. [7] J. Ziv and A. Lempel, Compression of Individual Sequences via Variable-Rate Coding, IEEE Transactions on Information Theory, September 78. [8] J. G. Cleary and W. J. Teahan and Ian H. Witten, Unbounded Length Contexts for PPM, Data Compression Conference, pp. -61,. [9] S. W. Golomb, Run-length encodings, IEEE Trans. Inform. Theory, Vol. IT-1, pp. 399-1, 66.