module09

module09 - Module 9 Compression CS 240 Data Structures and...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Module 9: Compression CS 240 - Data Structures and Data Management Arne Storjohann Based on lecture notes by R. Dorrigiv and D. Roche School of Computer Science, University of Waterloo Fall 2010 Arne Storjohann (CS, UW) CS240 - Module 9 Fall 2010 1 / 33 Data Storage and Transmission The problem : How to store and transmit data? Source text The original data, string of characters S from the source alphabet Σ S Coded text The encoded data, string of characters C from the coded alphabet Σ C Encoding An algorithm mapping source texts to coded texts Decoding An algorithm mapping coded texts back to their original source text Note : Source “text” can be any sort of data (not always text!) Usually the coded alphabet Σ C is just binary: { , 1 } . Arne Storjohann (CS, UW) CS240 - Module 9 Fall 2010 2 / 33 Judging Encoding Schemes We can always measure efficiency of encoding/decoding algorithms. What other goals might there be? Arne Storjohann (CS, UW) CS240 - Module 9 Fall 2010 3 / 33 Judging Encoding Schemes We can always measure efficiency of encoding/decoding algorithms. What other goals might there be? Processing speed Reliability (e.g. error-correcting codes) Security (e.g. encryption) Size Arne Storjohann (CS, UW) CS240 - Module 9 Fall 2010 3 / 33 Judging Encoding Schemes We can always measure efficiency of encoding/decoding algorithms. What other goals might there be? Processing speed Reliability (e.g. error-correcting codes) Security (e.g. encryption) Size Encoding schemes that try to minimize | C | , the size of the coded text, perform data compression . We will measure the compression ratio : | C | · lg | Σ C | | S | · lg | Σ S | Arne Storjohann (CS, UW) CS240 - Module 9 Fall 2010 3 / 33 Types of Data Compression Logical vs. Physical Logical Compression uses the meaning of the data and only applies to a certain domain (e.g. sound recordings) Physical Compression only knows the physical bits in the data, not the meaning behind them Lossy vs. Lossless Lossy Compression achieves better compression ratios, but the decoding is approximate; the exact source text S is not recoverable Lossless Compression always decodes S exactly For media files, lossy, logical compression is useful (e.g. JPEG, MPEG) We will concentrate on physical, lossless compression algorithms. These techniques can safely be used for any application. Arne Storjohann (CS, UW) CS240 - Module 9 Fall 2010 4 / 33 Character Encodings Standard character encodings provide a matching from the source alphabet Σ S (sometimes called a charset ) to binary strings. ASCII (American Standard Code for Information Interchange): Developed in 1963 7 bits to encode 128 possible characters: “control codes”, spaces, letters, digits, punctuation Not well-suited for non-English text: ISO-8859 extends to 8 bits, handles most Western languages Other (earlier) codes: Morse code, Baudot code Arne Storjohann (CS, UW) CS240 - Module 9 Fall 2010 5 / 33 Decoding Dictionary To decode ASCII, we look up each 7-bit pattern in a table.To decode ASCII, we look up each 7-bit pattern in a table....
View Full Document

This note was uploaded on 01/14/2012 for the course CS 246 taught by Professor Wormer during the Winter '08 term at Waterloo.

Page1 / 81

module09 - Module 9 Compression CS 240 Data Structures and...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online