notes13 - 251Notes:4/12,4/14,4/16 DataCompression...

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

View Full Document Right Arrow Icon
251 Notes: 4/12,4/14,4/16 Data Compression Data encoding fixed length encoding o each character represent by same number of bits o Ex: ASCII 8bits/char, Unicode 16bits/char variable length encoding o different characters use different lengths o prefix rule to prevent ambiguities in variable length encoding, the code for every character  must not be the prefix of any other character if A is 010, B cannot be 0101 how would we interpret the string 0101. ....? o to enforce prefix rule, we present encoding using an encoding trie A = 010 B = 11 C = 00 D = 10 R = 011 01011011010000101001011011010 A B R A C A D A B R A 11 chars in 29 bits using this encoding, vs 88 bits using ASCII o if you can represent encoding using a trie, guaranteed not to break prefix rule o different encoding tries give different kind of compression: a good trie should give an  encoded text as short as possible Huffman trie
Background image of page 1

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

View Full Document Right Arrow Icon
o builds optimal encoding trie for a given string o starts by building a histogram of occurrences of each character
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 6

notes13 - 251Notes:4/12,4/14,4/16 DataCompression...

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

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