Download presentation
Presentation is loading. Please wait.
Published byMichael Warren Modified over 6 years ago
1
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 1
2
Pre requisites Basics of Information coding. 22
Before using this LO, the user should know about the following: Basics of Information coding. 2
3
Project OSCAR IDD Template 4.7
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 3
4
Keywords in this LO Dictionary:
44 Keywords in this LO These are the keywords and their description in this LO Dictionary: The pre-defined dictionary are the ASCII characters from , 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
5
Element groups in this LO
55 Element groups in this LO Name of the element group and Abbreviation Name of the elements in the group Rank of element group (in terms of the most important element group on the screen that students should focus on) 1: most important, 2: next in importance, … and so on Input Textbox 1 Dictionary Listbox Output 5 5
6
Write the name of the element group 1
66 Write the name of the element group 1 The title of each column explains contains guidelines on the details required.) Name of the element Abbreviation Reference image Image for using in LO Functional or interactivity details Connected to Input Textbox 1. Here text will be entered by the user 2. After every character is entered by the user the character will be checked in the dictionary as explained in the algorithm and following steps. 6 6
7
Write the name of the element group 1
77 Write the name of the element group 1 The title of each column explains contains guidelines on the details required.) Name of the element Abbreviation Reference image Image for using in LO Functional or interactivity details Connected to Dictionary Listbox Initialize dictionary with ASCII characters from by numbering them from 0-94. Refer to the algorithm shown in the next slide and the further steps. 7 7
8
Search for the longest block W which has appeared in the dictionary.
Encoding Algorithm: After having the dictionary initialized to contain the ASCII characters from 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 8
9
Supportive image for step 1a
Raw Comp. Total no. of codes sent 9 9
10
Supportive image for step 1b
Raw Comp. Total no. of codes sent 10 10
11
Step 1 11111111 S. No. Description of the action / interactivity
Start Time of the action End Time of the action Audio narration On screen text 1. The dictionary is to be reset with ASCII characters from assigned as 0-94 respectively is a code for that particular character. For eg., ASCII of a is 97, so after rearranging ASCII characters as 0-94, we have code for a as 65. So 0-94 are the codes for the respective characters. 0 sec 2. The figures shown in the next few slides is based on the example string: “abaabccffebacdabcf” taken serially 11 11
12
Supportive image for step
Raw Comp. Total no. of codes sent 12 12
13
Step 2 13131313 Description of the action / interactivity
Start Time of the action End Time of the action Audio narration On screen text When the 1st character is entered, as this character is already present in the dictionary, it waits for the next character to come, again checks if this character along with the previous character together as a block of characters is present in the dictionary. As the dictionary initially only has single length characters encoded in the dictionary, it will add this block of characters to its dictionary as well and code them as 95. When user enters 1st character in the input textbox. Now the output box will show the code for the 1st character. 13 13
14
Supportive image for step 3
Raw Comp. Total no. of codes sent 14 14
15
Step 3 15151515 Sr. no. Description of the action / interactivity
Start Time of the action End Time of the action Audio narration On screen text 1. if previous block (this block can be a single character as well) and the next character together as a block is already present in the dictionary then the code for this block is shown in the output along with the previous output. else the code for previous character is shown in the output along with the previous output and will be sent to the output box and the previous block along with the next character together formed as a block is updated in the dictionary with a next new code assigned to it. Wait till user inputs next character 2. Jump to serial no. 2. and keep on repeating it until the dictionary is filled with 256 blocks. (already 95 (0-94) codes/blocks were present, so additional 161 blocks can be added ) After sr.no.1 is complete 15 15
16
Supportive image for step 3a
Raw Comp. Total no. of codes sent 16 16
17
Supportive image for step 3b
Raw Comp. Total no. of codes sent 17 17
18
Supportive image for step 3c
Raw Comp. Total no. of codes sent 18 18
19
Supportive image for step 3d
Raw Comp. Total no. of codes sent 19 19
20
Supportive image for step 3e
Raw Comp. Total no. of codes sent 20 20
21
Supportive image for step 3f
Raw Comp. Total no. of codes sent 21 21
22
Supportive image for step 3g
Raw Comp. Total no. of codes sent 22 22
23
Supportive image for step 3h
Raw Comp. Total no. of codes sent 23 23
24
Supportive image for step 3i
Raw Comp. Total no. of codes sent 24 24
25
Supportive image for step 3j
Raw Comp. Total no. of codes sent 25 25
26
Supportive image for step 3k
Raw Comp. Total no. of codes sent 26 26
27
Supportive image for step 3l
Raw Comp. Total no. of codes sent 27 27
28
Supportive image for step 3m
Raw Comp. Total no. of codes sent 28 28
29
Supportive image for step 3n
Raw Comp. Total no. of codes sent 29 29
30
Supportive image for step 3o
Raw Comp. Total no. of codes sent 30 30
31
Supportive image for step 3p
Raw Comp. Total no. of codes sent 31 31
32
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 32
33
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 33
34
References Website links for further reading: 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 34
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.