Introduction To Information Technology: Lecture #6
Introduction To Information Technology: Lecture #6
Introduction To Information Technology: Lecture #6
Technology
Lecture #6
Overview
Chapter 7: Compression
Introduction
Entropy
Huffman coding
Universal coding
Introduction
World Wide Web not World Wide Wait
Compression techniques can significantly reduce the bandwidth and memory
required for sending, receiving, and storing data.
Most computers are equipped with modems that compress or decompress all
information leaving or entering via the phone line.
With a mutually recognized system (e.g. WinZip) the amount of data can be
significantly diminished.
Examples of compression techniques:
Compressing BINARY DATA STREAMS
Variable length coding (e.g. Huffman coding)
IMAGE-SPECIFIC COMPRESSION (will will see that images are well suited for
compression)
GIF and JPEG
VIDEO COMPRESSION
MPEG
Why can we compress information?
“Ask not what your country can do for you - ask what you can do for your country.”
techniques.
A Little Probability
As part of
information theory,
Bits Shannon developed the
concept of ENTROPY
Probability of an
event
Example from text..
A MEN’S SPECIALTY STORE
A B B C B A
The above
MM example
MF has
MF usedFM
a variable
MF length
MM code.
Variable Length Coding
Takes advantage of the probabilistic nature of information.
Unlike fixed length codes like ASCII, variable length codes:
Assign the longest codes to the most infrequent events.
Huffman Coding
Leaves
Huffman Code Construction
First list all events in descending order of probability.
Pair the two events with lowest probabilities and add their probabilities.
0.15
0.25 0.15
0.4
0.25 0.15
0.6 0.4
0.25 0.15
0 1
0.6 0.4
0 1
0.25 0.15
0 1
0 1 0 1