Chapter3 Example

Chapter3 Example - Design Example: data compressor. Goals:...

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

View Full Document Right Arrow Icon
Design Example: data compressor. Goals: Compress data transmitted over serial line. Receives byte-size input symbols. Produces output symbols packed into bytes. Will build software module only here.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Collaboration diagram for compressor :input :data compressor :output 1..n: input symbols 1..m: packed output symbols
Background image of page 2
Huffman coding Early statistical text compression algorithm. Select non-uniform size codes. Use shorter codes for more common symbols. Use longer codes for less common symbols. To allow decoding, codes must have unique prefixes. No code can be a prefix of a longer valid code.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Huffman example character Probability of occurrence a .45 b .24 c .11 d .08 e .07 f .05 P=1 P=.55 P=.31 P=.19 P=.12 Explanation on next slide
Background image of page 4
Example Huffman code Read code from root to leaves: a 1 b 01 c 0000 d 0001 e 0010 f 0011
Background image of page 5

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

View Full DocumentRight Arrow Icon
Huffman coder requirements table name data compression module purpose code module for Huffman compression inputs encoding table, uncoded
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 20

Chapter3 Example - Design Example: data compressor. Goals:...

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

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