Understanding Lempel-Ziv-Welch (LZW) Algorithm

lzw algorithm l.w
1 / 8
Embed
Share

Explore the Lempel-Ziv-Welch (LZW) algorithm, a universal lossless data compression technique designed by Abraham Lempel, Jacob Ziv, and Terry Welch. Learn about its encoding process, decoding method, and initial dictionary setup, enabling efficient compression and decompression of data.

  • LZW Algorithm
  • Data Compression
  • Lossless Compression
  • Encoding
  • Decoding

Uploaded on | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. LZW ALGORITHM BY DR. HUDA ABDULAALI

  2. LempelZivWelch (LZW) is a universal lossless data compression algorithm created byAbraham Lempel,Jacob Ziv, andTerry Welch. It was published by Welch in 1984 as an improved implementation of the LZ78 algorithm published by Lempel and Ziv in 1978. The algorithm is simple to implement and has the potential for very high throughput in hardware implementations. It is the algorithm of the widely used Unix file compression utility compress and is used in the GIF image forma t.

  3. ENCODING A high level view of the encoding algorithm is shown here: 1- Initialize the dictionary to contain all strings of length one. 2- Find the longest string W in the dictionary that matches the current input. 3- Emit the dictionary index for W to output and remove W from the input. 4- Add W followed by the next symbol in the input to the dictionary. Go to Step 2.

  4. EXAMPLE TOBEORNOTTOBEORTOBEORNOT# There are thus 26 symbols in the plaintext alphabet (the 26 capital letters A through Z), and the #character represents a stop code. We arbitrarily assign these the values 1 through 26 for the letters, and 0 for '#'. (Most flavors of LZW would put the stop code after the data alphabet, but nothing in the basic algorithm requires that. The encoder and decoder only have to agree what value it has.)

  5. The initial dictionary, then, will consist of the following entries:

  6. Encoding[ Buffer input characters in a sequence until + next character is not in the dictionary. Emit the code for , and add + next character to the dictionary. Start buffering again with the next character. (The string to be encoded is "TOBEORNOTTOBEORTOBEORNOT#".)

  7. Decoding To decode an LZW-compressed archive, one needs to know in advance the initial dictionary used, but additional entries can be reconstructed as they are always simply concatenations of previous entries.

More Related Content