# Data Compression and Decompression Algorithms

Topics: Data compression, Lossless data compression, Huffman coding Pages: 12 (2572 words) Published: March 24, 2013
Introduction………………………………………………………………………..…………………………….…2 1.Data Compression……………………………………..………………………………………………………2 1.1Classification of Compression……………………………………………………………………...2 1.2 Data Compression methods…………………………………………..……………………………3 2. Lossless Compression Algorithm……………..……………………………………………………….4 2.1 Run-Length Encoding……………………..…………………………….……………………………4 2.1.1 Algorithm……………………………..………………………………………………………………….5 2.1.2Complexity ……………………………..………………………………..……………………………….5 2.1.3 Advantages and disadvantage…………..…………………….………………………………6 3. Huffmann coding………………………………..……………………….…………………………………6 3.1 Huffmann encoding…………………………..………………………………………………………..6 3.2 Algorithm…………………………………………………………..……………………………………….7 4. Lempel-Ziv algorithm…………………………………………..……………………………………………7 4.1 Lempel-Ziv78……………………………………………..……………………………………………….8 4.2Encoding Algorithm……………………………………………………………………………………..8 4.3 Decoding Algorithm…………………………………………………………………………………..12 5.Lempel-Ziv Welch…………………………………………………………………………………………….14 5.1 Encoding Algorithm…………………………………………………………………………………..14 5.2 Decoding Algorithm…………………………………………………………………………………..16 References………………………………………………………………………………………………………….17

INTRODUCTION:
Data compression is a common requirement for most of the computerized applications. There are number of data compression algorithms, which are dedicated to compress different data formats. Even for a single data type there are number of different compression algorithms, which use different approaches. This paper examines lossless data compression algorithms.

1. DATA COMPRESSION:
In computer science data compression involves encoding information using fewer bits than the original representation.Compression is useful because it helps reduce the consumption of resources such as data space or transmission capacity. Because compressed data must be decompressed to be used, this extra processing imposes computational or other costs through decompression. 1.1 Classification of Compression:

A static method is one in which the mapping from the set of messages to the set of codewords is fixed before transmission begins, so that a given message is represented by the same codeword every time it appears in the message ensemble. The classic static defined-word scheme is Huffman coding.

A code is dynamic if the mapping from the set of messages to the set of codewords changes over time.

2.2 Data Compression Methods:

1) Losseless Compression:

Lossless compression reduces bits by identifying and eliminating statistical redundancy. No information is lost in Lossless compression is possible because most real-world data has statistical redundancy. For example, an image may have areas of colour that do not change over several pixels; instead of coding "red pixel, red pixel, ..." the data may be encoded as "279 red pixels".  Lossless compression is used in cases where it is important that the original and the decompressed data be identical, or where deviations from the original data could be deleterious. Typical examples are executable programs, text documents, and source code. Some image file formats, like PNG or GIF, use only lossless compression

2) Loosy Compression:

In information technology, lossy compression is a data encoding method that compresses data by discarding (losing) some of it. The procedure aims to minimize the amount of data that needs to be held, handled, and/or transmitted by a computer. Lossy compression is most commonly used to compress multimedia data (audio, video, and still images), especially in applications such as streaming media and internet telephony. If we take a photo of a sunset over the sea, for example there are going to be groups of pixels with the same colour value, which can be reduced....

Please join StudyMode to read the full document