lec 1

Compression

The process of coding that will effectively reduce the total number of bits

Lossless

Exploits Redundancy in data

Applied to general data

bit-preserving or reversible compression
systems

Allows complete recovery

Lossless Methods

Run length

one of the simplest forms of data compression.

WWWWWBWWWWBBBWWWWWWBWWW

5W1B4W3B6W1B3W

Huff-man

Use binary tree to encode compressed file

output path from root to leaf

Size of encoding = length of path

Creating the Binary tree

1.Initialization

2.Repeat until the list has only one symbol left

LempelZiv

Lossy

does not allow recovery

Exploits redundancy & human perception

Video and audio compression

Lossy Methods

JPEG

MPEG

MP3

Compression ratio = B0%B1

Working with Text

Avoid decorative (serif) fonts for small sizes

Use different colours and backgrounds

Use space between lines

Avoid scrolling text

Keep lines short

Convert non-standard fonts to graphics

other ways to communicate

Hyperlinking

Pop-up Message

Drop down boxes

Redundancy

Recognize repeating patterns

Dictionary

Variable length encoding

Human perception

Less sensitive to some information

typeface

family of graphic , sizes & styles

Times, Courier and Arial

Serif is decoration at end of letter strokes

Prefix-Codes