praseethasnair123
21,099 views
13 slides
Jan 19, 2013
Slide 1 of 13
1
2
3
4
5
6
7
8
9
10
11
12
13
About This Presentation
No description available for this slideshow.
Size: 199.29 KB
Language: en
Added: Jan 19, 2013
Slides: 13 pages
Slide Content
RUN LENGTH ENCODING Praseetha S Nair M.Tech(CS)
COMPRESSION Data compressed by eliminating redundant elements. Purpose of compression:- -save storage space -reduce communications capacity requirements Some code must be substituted for eliminated element. Based on this code receiver can reconstruct original data.
Categories:- 1.lossless compression -no information lost -decompressed data are identical to original uncompressed data 2.lossy compression -decompressed data may be an approximation to the original uncompressed data
Null Suppression Oldest and simplest Long string of blanks , nulls etc cause redundancy. At transmitter: -scans data for string of blanks. -substitute two character code for any string that is encountered.
Example : the string XYZ bbbbb QRX is replaced by XYZS C 5QRX where S c is a special compression indication character b is symbol for a blank space
At receiver : -scan incoming character for special indication character -reconstruct original data
Run-Length E ncoding Compress any type of repeating data sequence At transmitter: -identify repeating characters to replace -if found, eliminate and replace by three- character code
S c X C c S c -Special character indicating compression follows X-Any repeated data character C c -Character count (a) Compression format Original data string Encoded data string $******55.72 $ c *655.72 --------- S c- 9 Guns bbbbbbbbb Butter GunsS c b9Butter (b)Examples Fig: Run-Length Encoding
Efficiency depends on -number of repeated character occurrences in data to be compressed -average repeated character length. Compression ratio= length of uncompressed data length of compressed data Any compression scheme will have variable performance as the content of the input varies.
It is used as an element in more complex image compression technique. For run-length encoding on an image, transmission of digital line scan is replaced by transmission of a quantity count of each of successive run of black or white scanned picture element.
Application of run length encoding to a 10X10 image. 10X10 representation is converted to a 100-bit code. Each pixel is represented by a single bit indicate black or white. Run-length code consist of length of alternate black or white sequence. Encoded data stream is a string of number that indicate length of alternate black or white runs.