LempelZivWelch
Lempel-Ziv-Welch (LZW) is a lossless data compression algorithm developed by Terry A. Welch in 1984. It builds on the Lempel-Ziv family of algorithms, notably the LZ78 method introduced by Abraham Lempel and Jacob Ziv in 1978, and is distinguished by its use of a dynamic dictionary. In LZW, the encoder maintains a dictionary of strings, initially containing all single-character symbols. As the input stream is processed, the longest string that currently exists in the dictionary is found, its code is output, and a new dictionary entry is created by appending the next input character to that string. The decoder performs the inverse operation, using the codes to reconstruct the strings and to update its own dictionary in lockstep with the encoder.
LZW is a one-pass, dictionary-based compression technique that typically uses fixed-length codes (commonly 12 bits) and
LZW gained wide adoption in the GIF image format (and in several other file formats) during the