top of page
Blog: Blog2
Search

LZW - What is it?

  • Writer: anmonaco
    anmonaco
  • Oct 31, 2018
  • 1 min read

LZW is a universal lossless compression algorithm. It was created in 1984 by Abraham Lempel, Jacob Ziv, and Terry Welch as an improvement to the previous 1978 algorithm. This is the algorithm of the Unix file compression utility and GIF format. The algorithm works by encoding sequences of 8-bit data as fixed-length 12-bit codes. There are different stages of compression, and at each stage input bytes are gathered into a sequence until the next character would make a new dictionary code. To get maximum compression this uses variable-width, where codes start one bit wider than the symbols being encoded, and as each size is used up, the width increases by 1 bit.

The encoding algorithm has five steps. It starts with initializing the dictionary to contain all strings of length one, then finding the longest W string in the dictionary. Next the W string is removed and put in the dictionary with a symbol, and then the process repeats. This can also be decoded for understanding. LZW compression was the first widely used universal data compression method on computers!


 
 
 

Commenti


©2018 by Anna Monaco. Proudly created with Wix.com

  • facebook
  • twitter
  • linkedin
bottom of page