340 likes | 484 Views
Information of the LO. Subject: Information Theory Domain: Digital Communication Sub domain: Lossless Data Compression Topic: Lempel–Ziv–Welch Compression Education Level : UG
E N D
Information of the LO • Subject: Information Theory • Domain: Digital Communication • Sub domain: Lossless Data Compression • Topic: Lempel–Ziv–Welch Compression • Education Level: UG • The Lempel-Ziv algorithm is an adaptive type of algorithm. The basic idea is to replace recurring patterns with references to a dictionary. • Author: Mentor: • Jasveer Singh T. Jethra Prof. Sachin Patkar 1
Pre requisites Before using this LO, the user should know about the following: Basics of Information coding. 2
Learning objectives After interacting with this LO the user should be able to: Compress stream of data using Lempel–Ziv–Welch algorithm. Decompress by decoding the Lempel–Ziv–Welch encoded data. Project OSCAR IDD Template 4.7 3
Keywords in this LO These are the keywords and their description in this LO Dictionary: The pre-defined dictionary are the ASCII characters from 32-126, because they are the displayable ones. Additional characters are added as set of 2 or more characters together. 2. Compression Ratio: The term used to quantify the reduction in data-representation size produced by a data compression algorithm. Compression Ratio = Compressed Size Uncompressed Size 4
Write the name of the element group 1 The title of each column explains contains guidelines on the details required.) 6
Write the name of the element group 1 The title of each column explains contains guidelines on the details required.) 7
Encoding Algorithm: • After having the dictionary initialized to contain the ASCII characters from 32-126 redefined as 0-94, start taking input from the given string and name it as W. • Search for the longest block W which has appeared in the dictionary. • Encode W by its index in the dictionary. • Add W followed by the first symbol of the next block to the dictionary. • Go to Step 2. 8
Supportive image for step 1a Raw Comp. Total no. of codes sent 0 0 9
Supportive image for step 1b Raw Comp. Total no. of codes sent 0 0 10
Step 1 11
Supportive image for step Raw Comp. Total no. of codes sent 0 0 12
Step 2 13
Supportive image for step 3 Raw Comp. Total no. of codes sent 1 1 14
Step 3 15
Supportive image for step 3a Raw Comp. Total no. of codes sent 2 2 16
Supportive image for step 3b Raw Comp. Total no. of codes sent 3 3 17
Supportive image for step 3c Raw Comp. Total no. of codes sent 3 3 18
Supportive image for step 3d Raw Comp. Total no. of codes sent 5 4 19
Supportive image for step 3e Raw Comp. Total no. of codes sent 6 5 20
Supportive image for step 3f Raw Comp. Total no. of codes sent 7 6 21
Supportive image for step 3g Raw Comp. Total no. of codes sent 8 7 22
Supportive image for step 3h Raw Comp. Total no. of codes sent 9 8 23
Supportive image for step 3i Raw Comp. Total no. of codes sent 10 9 24
Supportive image for step 3j Raw Comp. Total no. of codes sent 10 9 25
Supportive image for step 3k Raw Comp. Total no. of codes sent 12 10 26
Supportive image for step 3l Raw Comp. Total no. of codes sent 13 11 27
Supportive image for step 3m Raw Comp. Total no. of codes sent 14 12 28
Supportive image for step 3n Raw Comp. Total no. of codes sent 14 12 29
Supportive image for step 3o Raw Comp. Total no. of codes sent 14 12 30
Supportive image for step 3p Raw Comp. Total no. of codes sent 17 13 31
Question 1: What type of data compression is LZW? • Answers: • 1. Lossy 2. Lossless 3. None of above • Correct answer: 2 • Feedback/Justification to be displayed: • If user clicks correct answer then display: “Correct! Make sure you can explain the reasoning!” • If user clicks incorrect answer then display “Have a look at the animation and Try again!” 32
Question 2: LZW compression is based on which method? • Answers: • 1. Dictionary 2. Statistical 3. None of above • Correct answer: 1 • Feedback/Justification to be displayed: • If user clicks correct answer then display “Correct! Make sure you can explain the reasoning!” • If user clicks incorrect answer then display “Have a look at the animation and Try again!” 33
References Website links for further reading: http://en.wikipedia.org/wiki/LZW Books: The Data Compression Book by Mark Nelson. Research papers: Terry Welch, "A Technique for High-Performance Data Compression", IEEE Computer, June 1984, p. 8–19 34