Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 8

Comparison of LZ Algorithm variants

Basic Principle of LZ Algorithm: Dictionary Coding:

Dictionary coding techniques rely upon the observation that there are recurring patterns in the data . The basic idea is to replace those repetitions by references to a "dictionary.

LZ77
Goes through the text in a sliding window consisting of a search buffer and a look ahead buffer. The search buffer is used as dictionary.

LZ78
Maintains an explicit dictionary. The codewords output by the algorithm consist of two elements: an index referring to the longest matching dictionary entry and the rst non-matching symbol. While outputting the codeword, the algorithm also adds the index and symbol pair to the dictionary. The algorithm gradually builds up a dictionary.

Compression Rate and Compression Ratio


Compression Rate = (compressed_length / original_length) * 8 -- measured in bits per byte(bpb) or bits per symbol (bps)
Compression Ratio = output length/input length = compression rate/8

Comparison of LZ77 variants

bib: List of bibliography entries (ASCII) book: book (ASCII) obj: Executable les for VAX and Mac paper: Scientic papers (ASCII) pic: Black and white bitmap image term: Terminal session (ASCII)

Comparison of LZ78 variants

CATEGORY LZR LZSS LZ77 LZ77

Compression ratio for bitmap image


12.5 % 20 %

Compression Compression Ratio for paper ratio for book (ASCII) (ASCII)
56.25 % 42.5 % 53.75 % 46.25 %

LZFG
LZT LZC LZW

LZ78
LZ78 LZ78 LZ78

11.25 %
12.5 % 12.5 % 13.75 %

37.5 %
47.5 % 52.5 % 100 %

41.25 %
48.75 % 51.25 % 48.75 %

LZB performs best among LZ77 variants and LZFG performs best among LZ78 variants

You might also like