dictionarybasedcompression-100208230731-phpapp02

© All Rights Reserved

0 views

dictionarybasedcompression-100208230731-phpapp02

dictionarybasedcompression-100208230731-phpapp02

© All Rights Reserved

- Comparative Analysis of Dirac Pro-Vc-2 h.264 Avc and Avs China-p7
- x264 Options Explained (Avidemux)
- HPE Video Surveillance With Milestone and 3par
- TextureDecompressor vhd
- Project JPEG Decoder
- Audio Retrieval
- Effective MSE optimization in fractal image compression
- A Block Based Scheme for Enhancing Low Luminated Images
- Removal of Unwanted Objects using Image Inpainting - a Technical Review
- enfuse
- ch7_031102
- Data Compression Techniques
- Musical beauty and information compression
- Embedded Systems 2013 14 Syllabus
- Wiley Encyclopedia of Telecommunications Vol II
- digikam
- Image Compression
- Secured Lossless Medical Image Compression Based On Adaptive Binary Optimization
- An Entropy Coding System for Digital HDTV Application
- Https Ece.uwaterloo.ca ~z70wang Publications Icimcs11

You are on page 1of 40

Compression Techniques

Objectives:

Able to use different compression

techniques

Introduction

What is Compression?

{

{

{

extraction of source redundancy.

In other words, data compression seeks to

reduce the number of bits used to store or

transmit information.

There are a wide range of compression methods

which can be so unlike one another that they

have little in common except that they compress

data.

device can be effectively increased with

methods that compresses a body of data on its

way to a storage device and decompresses it

when it is retrieved.

In terms of communications, the bandwidth of a

digital communication link can be effectively

increased by compressing data at the sending

end and decompressing data at the receiving

end.

Compression

Information Theory, the idea of developing

efficient new coding methods was just

starting to be fleshed out. Ideas of entropy,

information content and redundancy were

explored.

One popular notion held that if the

probability of symbols in a message were

known, there ought to be a way to code the

symbols so that the message will take up

less space.

Compression

digital signals is now known as Shannon- Fano

coding. Shannon and Fano [~1948]

simultaneously developed this algorithm which

assigns binary codewords to unique symbols

that appear within a given data file.

forward, it had the unfortunate luck to be quickly

superseded by an even more efficient coding

system : Huffman Coding.

Compression

characteristics of Shannon-Fano coding.

Huffman coding could perform effective data

compression by reducing the amount of

redundancy in the coding of symbols.

It has been proven to be the most efficient

fixed-length coding method available.

Compression

been replaced by arithmetic coding.

Arithmetic coding bypasses the idea of

replacing an input symbol with a specific

code.

It replaces a stream of input symbols with a

single floating-point output number.

More bits are needed in the output number

for longer, complex messages.

Compression

Terminology

CompressorSoftware (or hardware) device that

compresses data

DecompressorSoftware (or hardware) device

that decompresses data

CodecSoftware (or hardware) device that

compresses and decompresses data

AlgorithmThe logic that governs the

compression/decompression process

Compression can be

categorized in two broad ways:

Lossless compression

recover the exact original data after

compression.

mainly use for compressing database

records, spreadsheets or word

processing files, where exact

replication of the original is essential.

Compression can be

categorized in two broad ways:

Lossy compression

will result in a certain loss of accuracy in

exchange for a substantial increase in

compression.

more effective when used to compress graphic

images and digitised voice where losses outside

visual or aural perception can be tolerated.

Most lossy compression techniques can be

adjusted to different quality levels, gaining higher

accuracy in exchange for less effective

compression.

Lossless Compression

Algorithms:

Lossless Compression

Algorithms:

Repetitive Sequence Suppression

Run-length Encoding*

Pattern Substitution

Entropy Encoding*

{

{

{

Huffman Coding*

Arithmetic Coding*

Dictionary-based

compression algorithms

use a completely different method to

compress data.

They encode variable-length strings of

symbols as single tokens.

The token forms an index to a phrase

dictionary.

If the tokens are smaller than the phrases,

they replace the phrases and compression

occurs.

Dictionary-based

compression algorithms

Concise English dictionary which contains

about 159,000 entries. Why not just transmit

each word as an 18 bit number?

Problems:

{

{

{

everyone needs a dictionary,

only works for English text.

adaptively.

Dictionary-based

compression algorithms

techniques called LZ77 and LZ78 have been

developed.

LZ77 is a "sliding window" technique in which

the dictionary consists of a set of fixed- length

phrases found in a "window" into the

previously seen text.

LZ78 takes a completely different approach to

building a dictionary. Instead of using

fixedlength phrases from a window into the

text, LZ78 builds phrases up one symbol at a

time, adding a new symbol to an existing

phrase when a match occurs.

Dictionary-based

compression algorithms

summarised as follows:

Example

Dictionary-based

compression algorithms

summarised as follows:

10

Example:

Dictionary-based compression

algorithms Problem

{

and use LRU

Solution 2: Monitor compression

performance and flush dictionary when

performance is poor.

11

Repetitive

Sequence Suppression

and implement.

Simplicity is their downfall: NOT best

compression ratios.

Some methods have their applications,

e.g.Component of JPEG, Silence

Suppression.

tokens appears

{

of occurrences.

Usually need to have a special flag to denote

when the repeated token appears

Example

89400000000000000000000000000000000

we can replace with 894f32, where f is the

flag for zero.

12

{

the data.

technique include:

{

{

{

{

{

{

Suppression)

Silence in audio data, Pauses in conversation

etc.

Bitmaps

Blanks in text or program source files

Backgrounds in images

Other regular image or data tokens

Run-length Encoding

13

Run-length Encoding

Run-length Encoding

14

Run-length Encoding

Run-length Encoding

Uncompress

White Blue White White White White White Blue etc.

Compress

1XWhite 1XBlue 4Xwhite 1XBlue 1XWhite

etc.

15

Run-length Encoding

Pattern Substitution

16

Entropy Encoding

and Fano an ordered table is required

providing the frequency of any symbol.

Each part of the table will be divided into two

segments.

The algorithm has to ensure that either the

upper and the lower part of the segment

have nearly the same sum of frequencies.

This procedure will be repeated until only

single symbols are left.

17

The Shannon-Fano

Algorithm

The Shannon-Fano

Algorithm

18

The Shannon-Fano

Algorithm

The Shannon-Fano

Algorithm

19

The Shannon-Fano

Algorithm

Example Shannon-Fano

Coding

20

Example Shannon-Fano

Coding

STEP 1

SYMBOL

FREQ

SUM

CODE

STEP 2

SUM

CODE

11

STEP 3

SUM

CODE

11

Example Shannon-Fano

Coding

21

Example Shannon-Fano

Coding

Huffman Coding

22

Huffman Coding

Huffman Coding

23

Huffman Coding

Huffman Coding

24

Huffman Coding

Huffman Coding

25

Huffman Coding

Huffman Coding

26

27

Huffman Coding

28

Huffman Coding

Huffman Coding

29

Arithmetic Coding

Arithmetic Coding

30

Arithmetic Coding

Arithmetic Coding

31

Arithmetic Coding

Arithmetic Coding

32

Arithmetic Coding

Arithmetic Coding

33

Arithmetic Coding

Arithmetic Coding

34

Arithmetic Coding

Arithmetic Coding

35

Arithmetic Coding

1.

Example:

BACA

low = 0.59375, high = 0.60937.

2.

CAEE$

low = 0.33184, high = 0.3322.

36

Decimal

1

2

3

4

5

+ 2+ 3+ 4+ 5

1

10 10 10 10 10

= 1 10 1 + 2 10 2 + 3 10 3 + 4 10 4 + 5 10 5

0.12345 =

0.12345

x

x

x

x

x

10-5

10-4

10-3

10-2

10-1

Binary

0 . 01010101

0

1

0

1

0

1

0

1

+

+

+

+

+

+

+

21 2 2 2 3 2 4 2 5 2 6 2 7 2 8

= 1 2 2 + 1 2 4 + 1 2 6 + 1 2 8

0.01010

x 2-5

x 2-4

x 2-3

x 2-2

x 2-1

37

Binary to decimal

0.12 = 0.510

0.012 = 0.2510

What is a value of

0.010101012 in

decimal?

0.0012 = 0.12510

0.00012 = 0.062510

0.000012 = 0.0312510

0.033203125

encoder

[0.33184,0.33220]

BEGIN

code=0;

k=1;

while( value(code) < low )

{

assign 1 to the k-th binary fraction bit;

if ( value(code) > high)

replace the k-th bit by 0;

k = k + 1;

}

END

38

Example1

Range (0.33184,0.33220)

BEGIN

Binary

code=0;

Decimal

k=1;

while( value(code) < 0.33184 )

{

assign 1 to the k-th binary fraction bit;

if ( value(code) > 0.33220 )

replace the k-th bit by 0;

k = k + 1;

}

END

Example1

Range (0.33184,0.33220)

1.

(codeword=0.12) and compare with low

(0.3318410)

{

{

2.

Hence, we assign 0 for the first bit.

value(0.02)< 0.3318410 -> while loop continue

=0.2510 which is less then high (0.33220)

39

Example1

Range (0.33184,0.33220)

3.

4.

5.

=0.2510+ 0.12510 = 0.37510 which is bigger

then high (0.33220), so replace the kbit by

0. Now the codeword = 0.0102

Assign 1 to the fourth fraction (0.01012) =

0.2510 + 0.062510 =0.312510 which is less

then high (0.33220). Now the codeword =

0.01012

Continue

Example1

Range (0.33184,0.33220)

generate is 0.01010101 which

0.033203125

8 bit binary represent CAEE$

40

- Comparative Analysis of Dirac Pro-Vc-2 h.264 Avc and Avs China-p7Uploaded bymatttters
- x264 Options Explained (Avidemux)Uploaded byNguyễn Minh Vũ
- HPE Video Surveillance With Milestone and 3parUploaded bymasoboy2000
- TextureDecompressor vhdUploaded bylaxer3a
- Project JPEG DecoderUploaded byParsa Amini
- Audio RetrievalUploaded bynidee_nishok
- Effective MSE optimization in fractal image compressionUploaded byijcsis
- A Block Based Scheme for Enhancing Low Luminated ImagesUploaded byIJMAJournal
- enfuseUploaded byrghome
- Removal of Unwanted Objects using Image Inpainting - a Technical ReviewUploaded byAnonymous 7VPPkWS8O
- ch7_031102Uploaded bysoumya chatterjee
- Data Compression TechniquesUploaded bysatydesh
- Musical beauty and information compressionUploaded byBuddy Numone
- Embedded Systems 2013 14 SyllabusUploaded bylog4iqbal
- Wiley Encyclopedia of Telecommunications Vol IIUploaded byvivaelzorro1994
- digikamUploaded byScribdOld
- Image CompressionUploaded byHossain Mohammad Mahbub
- Secured Lossless Medical Image Compression Based On Adaptive Binary OptimizationUploaded byInternational Organization of Scientific Research (IOSR)
- An Entropy Coding System for Digital HDTV ApplicationUploaded byMohammad Hossein Ranjbar
- Https Ece.uwaterloo.ca ~z70wang Publications Icimcs11Uploaded byPrateek Bhartiya
- II SEM SyllabusUploaded byVisakh Vijay
- Sound in FlashUploaded byakfaditadikaparira
- 2Uploaded byapi-264089547
- G.723.1Uploaded byDragan Golubovic
- “Image Compression Using Discrete CosineUploaded byEzhilarasan Kaliyamoorthy
- OTL R12 x Student Guidee CommerceUploaded bykaushik4end
- Audio in LogicUploaded bybarryk3
- Digital image processing QB 2017 - 18Uploaded byPrakherGupta
- Student AttendanceUploaded byHarikrishnan Shunmugam
- Question Set for PEUploaded byyawu

- Plantilla.pdfUploaded byVinicioRamirez
- Plantilla carga Horaria.pdfUploaded byVinicioRamirez
- OFDM_MIMOUploaded byGuy AZ Hilaire
- It342 Multimedia Data Compression Part IIUploaded byVinicioRamirez
- Qlik Sense Developer Quick StartUploaded byVinicioRamirez
- Chapter 7Uploaded byVinicioRamirez
- Hsrp Ndg LabUploaded byVinicioRamirez
- Scaling Networks Companion GuideUploaded byVinicioRamirez
- Eaton 9155 8 - 15kVA Tech SpecsUploaded byVinicioRamirez

- "Debt: the First 5000 Years" by David Graeber (2009)Uploaded byrecycled minds
- 1493_1494_example_labUploaded byAlgerd Alvar Moscosa
- Buitleir - Wombat's Irish GrammarUploaded byJedin1983
- India Glycols LimitedUploaded byVenkat Ram
- Purdue OWL_ APA Formatting and Style Guide p1 - Basic RulesUploaded byMc Jason Laurete
- Dossier06 Bioplastics Food PackagingUploaded bylu
- Role of the Physiotherapist in Cardiac Rehabilitation Document Version 4Uploaded byIrene Chrysovalanto Themistocleous
- ADR ra 9285Uploaded byDave A Valcarcel
- GoogleUploaded bysandip
- 05787279029129696487_46Uploaded byAbhishek Gupta
- "But God..." Introduction and Chapter 1Uploaded byCruciform Press
- Ulrike Felt, Rayvon Fouché, Clark a. Miller, Laurel Smith-Doerr (Eds.)-The Handbook of Science and Technology Studies-The MIT Press (2016)Uploaded byEnrique Olaya Herrera Ied
- urduUploaded byShamsno1
- REGForm016.pdfUploaded byPrice
- United States v. Wiltberger, 18 U.S. 35 (1820)Uploaded byScribd Government Docs
- Project on Consumer Perception About Amul ButterUploaded byVikash Maurya
- How Many LayersUploaded bybhplib
- Lecture 6Uploaded bythindmanmohan
- Investigation of the HipsterUploaded byZheng Liu
- 7th CSE Annexure FinalUploaded byBhavik
- 3D Reconstruction for a SmartphoneUploaded byLuc Vu
- 70 Greatest ConspiraciesUploaded byapi-3727537
- Law, Development and Socio-EconomicUploaded byslprabowo18
- Missions Student GuideUploaded byRuth Eller
- Animation DLLUploaded byBart Javillonar
- What is the implication of the global crisis to financial managers.docxUploaded byYenelyn Apistar Cambarijan
- Calculus of Variations Solution Manual RussakUploaded bysimplyfanatic
- Undergraduate Admissions Extenuating Circumstances FormUploaded bySheep Sleep
- DD CEN TS 13130-9-2005Uploaded byk1gabitzu9789
- Intra PartumUploaded byImac Reymart Bito Bolagao

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.