In: Computer Science
xxyz xxy xxyz xxyz xxyz
Some Infomation about LZW encoding.
Encoded o/p :- It contain message sequence.
index :- It is unique index of a certain pattern
Initial LZW dictionary:- It contain unique letter with unique index in the given sequence.
Algo:
1. Start with initial letter of the given sequence check it already exist in the table or not . If yes, then add another next letter do the same thing.
2. Give this pattern a unique index. Write the index of the entry which match the new pattern upto second last letter in the encoded o/p row.
3.Now find the another new pattern and start with last letter of the previous pattern.
4. Repeat the these again until string exhaust.
Answer:
Encode message: 1 1 2 3 4 2 8 7 5 11 6
Note: In some other methods , They use assci codes of the letter as index but the procedure of the answer is same.