1

DESC

Lossless Compression

Lossless compression schemes compress the data without loss of information, and the original data can be recovered exactly from the compressed data

Dictionary techniques

In many applications, the output of the source consists of recurring patterns. A classic example is a text source in which certain patterns or words recur constantly. Also, there are certain patterns that simply do not occur, or if they do, occur with great rarity. A very reasonable approach to encoding such sources is to keep a list, or dictionary, of frequently occurring patterns. When these patterns appear in the source output, they are encoded with a reference to the dictionary

There are two types of dictionary

static dictionary

Choosing a static dictionary technique is most appropriate when considerable prior knowledge about the source is available. This technique is especially suitable for use in specific applications

adaptive dictionary

Choosing a adaptive dictionary technique is most appropriate when there is no prior knowledge about the source is available

More
0

LZW

LZ2 Family is an ex for adaptive dictionary

LZW presented adaptive dictionary implementation through an explicit code book structure has an index and sequence of codes reflect that index and I does encode indices in the compressed file instead of the main sequence

LZW is used in many applications

More
0

Computer Model

UML

Class Diagram

Flow Chart

Encoding and Decoding Flow Chart

More
images\3\2004\ClassDigramSmall.jpg;images\3\2006\LZWEncodingChSmall.jpg;images\3\2005\LZWDecodingChartSml.jpg
images\3\2004\LZWClassDigramLrg.jpg;images\3\2006\LZWEncodeChart.jpg;images\3\2005\LZWDecodingChart.jpg
2

Use Case

Get Uncompressed Image

Get Uncompressed Image by deciding the path of the image which you like to compress

decide the destination

decide the destination to copy the resulted compressed file

Get Uncompressed Image

Get Compressed Image by deciding the path of thecompressed image which you like to uncompress

Display Result

Display the image in , output format and dictionary

More
images\4\3004\LZWMainSmall.jpg;images\4\3004\LZWMainSmall.jpg;images\4\3005\LZWDisplayResultSmall.bmp
images\4\3004\LZWMainJ.jpg;images\4\3004\LZWMainJ.jpg;images\4\3005\LZWDisplay.bmp
3

Source Code

Edited By

Eng : Sameh Mohamed Dabour

Source Code

Uncompress file and run using Microsoft Visual Studio

LZW.zip
More
0

DESC

Lossless Compression

Lossless compression schemes compress the data without loss of information, and the original data can be recovered exactly from the compressed data

Dictionary techniques

In many applications, the output of the source consists of recurring patterns. A classic example is a text source in which certain patterns or words recur constantly. Also, there are certain patterns that simply do not occur, or if they do, occur with great rarity. A very reasonable approach to encoding such sources is to keep a list, or dictionary, of frequently occurring patterns. When these patterns appear in the source output, they are encoded with a reference to the dictionary

There are two types of dictionary

static dictionary

Choosing a static dictionary technique is most appropriate when considerable prior knowledge about the source is available. This technique is especially suitable for use in specific applications

adaptive dictionary

Choosing a adaptive dictionary technique is most appropriate when there is no prior knowledge about the source is available

More