0% found this document useful (0 votes)
8 views4 pages

Multimedia 075bct054

The document is a lab report on the LZW compression algorithm, highlighting its lossless nature and widespread use in formats like GIF and Unix file compression. It explains the algorithm's operation, including the use of a code table and how it identifies repeated sequences for compression. The report concludes that LZW is favored for its simplicity, efficiency, and ability to compress data without prior knowledge of the input stream.

Uploaded by

075bct054.niraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Multimedia 075bct054

The document is a lab report on the LZW compression algorithm, highlighting its lossless nature and widespread use in formats like GIF and Unix file compression. It explains the algorithm's operation, including the use of a code table and how it identifies repeated sequences for compression. The report concludes that LZW is favored for its simplicity, efficiency, and ability to compress data without prior knowledge of the input stream.

Uploaded by

075bct054.niraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

TRIBHUVAN UNIVERSITY

INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS

MULTIMEDIA
Lab Report

Submitted By: Submitted To:


Name : Niraj Shrestha Prof. Dr. Subarna Shakya,
Roll no : 075BCT054 Department of Electronics
and Computer Engineering

Mar 13, 2023


Theory
The LZW algorithm is a well-known compression method that has
gained widespread use due to its lossless nature, which ensures that
data is not lost during compression. It has the potential to achieve high
throughput in hardware implementations and is easy to implement.
The GIF picture format and Unix file compression are examples of
where this compression algorithm is commonly used. LZW
compression relies on recurring patterns to save data space, and it is
regarded as the most popular method for general-purpose data
compression due to its ease of use and versatility.

LZW compression works by reading a sequence of symbols, grouping


the symbols into strings, and converting the strings into codes.
Because the codes take up less space than the strings they replace,
we get compression. Characteristic features of LZW includes,

● LZW compression uses a code table. Codes 0-255 in the


code table are always assigned to represent single bytes
from the input file.
● When encoding begins the code table contains only the
first 256 entries, with the remainder of the table being
blanks. Compression is achieved by using codes from 256
to a specified limit to represent sequences of bytes.
● As the encoding continues, LZW identifies repeated
sequences in the data and adds them to the code table.
● Decoding is achieved by taking each code from the
compressed file and translating it through the code table to
find what character or characters it represents
Output

Conclusion
Hence LZW is a very popular compression algorithm used extensively.
Since it is lossless, no data is lost during compression. Some of its
advantages over Huffman are as follows :
● LZW requires no prior information about the input data stream.
● LZW can compress the input stream in one single pass.
● Another advantage of LZW is its simplicity, allowing fast
execution.

You might also like