LZ77 (Sliding Window)
Data Compression
By - Ayush Gupta
LZ77 (SLIDING WINDOW)
• First paper by Ziv and Lempel in 1977 hence named
so.
• Goes through the text in a sliding window consisting:-
• Search Buffer.
• Look ahead Buffer.
• Text should be read from right to left in the buffer.
• The encoder check the symbol in Look ahead buffer with search buffer considered here as
dictionary.
• Offset is the count from the dividing line between search and look ahead buffer.
• Length is the span of string matched in look ahead buffer corresponding to search buffer.
• Symbol is the next character after the string match.
“How LZ77 works”
• To encode the sequence in the look-ahead buffer, the encoder moves a search pointer back
through the search buffer until it encounters a match to the first symbol in the look-ahead
buffer. The distance of the pointer from the look-ahead buffer is called the offset.
• The encoder then examines the symbols following the symbol at the pointer location to see if
they match consecutive symbols in the look-ahead buffer. The number of consecutive symbols
in the search buffer that match consecutive symbols in the look-ahead buffer, starting with the
first symbol, is called the length of the match.
• The encoder searches the search buffer for the longest match.
• The encoder searches the search buffer for the longest match. Once the longest match has been
found, the encoder encodes it with a triple <o, l, c>, where o is the offset, l is the length of the
match, and c is the codeword corresponding to the symbol in the look-ahead buffer that
follows the match.
LZ77 (SLIDING WINDOW)
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Input Text :
sir˽sid˽eastman˽easily˽teases˽sea˽sick˽seals
Note:- ˽ It represents space
LZ77 (SLIDING WINDOW)
sir˽ sid˽ eastman˽ easily˽ teases˽ sea˽ sick˽se
als
sir˽sid˽eastman˽easily˽teases˽sea˽sick˽se
als
Search Buffer (Dictionary)
Size = 30 symbols
Look ahead Buffer Size
= 10 symbols
Dividing Line
Text Movement
Encoding scheme (offset, length, next symbol)
LZ77 (SLIDING WINDOW)
s
ir˽ sid˽ eastman˽ easily˽ teases˽ sea˽ sick˽ seal
s
ir˽ sid˽ eastman˽ easily˽ teases˽ sea˽ sick˽seal
s
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (0, 0, s)
LZ77 (SLIDING WINDOW)
si
r˽sid˽eastman˽easily˽teases˽sea˽sick˽seal
s
r˽sid˽eastman˽easily˽teases˽sea˽sick˽seal
s
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (0, 0, s)
(0, 0, i )
LZ77 (SLIDING WINDOW)
sir ˽sid˽eastman˽easily˽teases˽sea˽sick˽seals˽sid˽eastman˽easily˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (0, 0, s)
(0, 0, i )
(0, 0, r )
LZ77 (SLIDING WINDOW)
sir ˽ sid˽eastman˽easily˽teases˽sea˽sick˽sealssid˽eastman˽easily˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (0, 0, s)
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
LZ77 (SLIDING WINDOW)
sir ˽sid ˽eastman˽easily˽teases˽sea˽sick˽seals˽eastman˽easily˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
Encoding scheme: (0, 0, s)
LZ77 (SLIDING WINDOW)
sir ˽sid ˽e astman˽easily˽teases˽sea˽sick˽sealsastman˽easily˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
Encoding scheme: (0, 0, s) (4, 1, e)
LZ77 (SLIDING WINDOW)
sir ˽sid ˽ea stman˽easily˽teases˽sea˽sick˽sealsstman˽easily˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, ˽ )
(4, 2, d )
Encoding scheme: (0, 0, s) (4, 1, e)
(0, 0, i ) (0, 0, a )
(0, 0, r )
LZ77 (SLIDING WINDOW)
sir ˽sid ˽east man˽ easily˽ teases˽ sea˽ sick˽ sealsman˽easily˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, ˽ )
(4, 2, d )
Encoding scheme: (0, 0, s) (4, 1, e)
(0, 0, i ) (0, 0, a )
(0, 0, r ) (10 ,1, t ) Take last occurrence of s and not
(6 ,1, t ) if length is same for both
LZ77 (SLIDING WINDOW)
sir ˽sid ˽eastm an˽easily˽teases˽sea˽sick˽sealsan˽easily˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (0, 0, s)
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
(4, 1, e)
(0, 0, a )
(10 ,1, t )
(0 ,0, m )
LZ77 (SLIDING WINDOW)
sir ˽sid ˽eastman ˽easily˽teases˽sea˽sick˽seals˽easily˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (0, 0, s)
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
(4, 1, e)
(0, 0, a )
(10 ,1, t )
(0 ,0, m )
(4, 1, n )
LZ77 (SLIDING WINDOW)
sir ˽sid ˽eastman˽easi ly˽ teases˽ sea˽ sick˽sealsly˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
(10 ,1, t )
(0 ,0, m )
(4, 1, n )
Encoding scheme: (8, 4, i)(0, 0, s)
(0, 0, i )
(4, 1, e)
(0, 0, a )
LZ77 (SLIDING WINDOW)
sir ˽sid ˽eastman˽easil y˽ teases˽ sea˽ sick˽sealsy˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
(10 ,1, t )
(0 ,0, m )
(4, 1, n )
Encoding scheme: (0, 0, s)
(0, 0, i )
(4, 1, e)
(0, 0, a )
(8, 4, i)
(0, 0, l )
LZ77 (SLIDING WINDOW)
sir ˽sid ˽eastman˽easily ˽ teases˽ sea˽ sick˽ seals˽teases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (0, 0, s)
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
(4, 1, e)
(0, 0, a )
(10 ,1, t )
(0 ,0, m )
(4, 1, n )
(8, 4, i)
(0, 0, l )
(0, 0, y )
LZ77 (SLIDING WINDOW)
sir ˽sid ˽eastman˽easily˽t eases˽sea˽sick˽sealseases˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (8, 4, i)
(0, 0, l )
(0, 0, y )
(19, 1, t)
(0, 0, s)
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
(4, 1, e)
(0, 0, a )
(10 ,1, t )
(0 ,0, m )
(4, 1, n )
LZ77 (SLIDING WINDOW)
sir ˽sid
˽eastman˽easily˽tease
s˽ sea˽ sick˽ sealss˽sea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
(0, 0, a )
(10 ,1, t )
(0 ,0, m )
(4, 1, n )
(0, 0, l )
(0, 0, y )
(19, 1, t)
(16, 3, e)
Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i)
LZ77 (SLIDING WINDOW)
sir˽sid˽eastman˽easily˽teases˽ sea˽ sick˽sealssea˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(4, 2, d )
(0, 0, a )
(10 ,1, t )
(0 ,0, m )
(4, 1, n )
(0, 0, l )
(0, 0, y )
(19, 1, t)
(16, 3, e)
Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽)
LZ77 (SLIDING WINDOW)
sir˽sid˽eastman˽easily˽teases˽sea ˽ sick˽ seals˽sick˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽)
(0, 0, i ) (0, 0, a ) (0, 0, l ) (4, 2, a)
(0, 0, r ) (10 ,1, t ) (0, 0, y )
(0, 0, ˽ ) (0 ,0, m ) (19, 1, t)
(4, 2, d ) (4, 1, n ) (16, 3, e)
LZ77 (SLIDING WINDOW)
sir˽sid˽eastman˽easily˽teases˽sea˽si
c
k˽sealsk˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(4, 2, d ) (4, 1, n ) (16, 3, e)
Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽)
(4, 2, a)
(30, 3,c)
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(0, 0, a )
(10 ,1, t )
(0 ,0, m )
(0, 0, l )
(0, 0, y )
(19, 1, t )
LZ77 (SLIDING WINDOW)
sir˽sid˽eastman˽easily˽teases˽sea˽si
ck
˽ seals˽seals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(4, 2, d ) (4, 1, n ) (16, 3, e)
Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽)
(0, 0, i )
(0, 0, r )
(0, 0, ˽ )
(0, 0, a )
(10 ,1, t )
(0 ,0, m )
(0, 0, l )
(0,0,y)
(19, 1, t )
(4, 2, a)
(30, 3,c)
(0,0,k)
LZ77 (SLIDING WINDOW)
ss
sir˽sid˽eastman˽easily˽teases˽sea˽sick˽s
eal
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, i )
(0, 0, r )
(0, 0, a ) (0, 0, l ) (4, 2, a)
(10 ,1, t ) (0, 0, y) (30, 3,c)
(0, 0, ˽ ) (0 ,0, m ) (19, 1, t) (0,0,k)
(4, 2, d ) (4, 1, n ) (16, 3, e) (9, 4, l)
Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽)
LZ77 (SLIDING WINDOW)
sir˽ sid˽ eastman˽ easily˽ teases˽ sea˽sick˽ s
eals
Search Buffer (Dictionary) Look ahead Buffer
Dividing Line
Text Movement
(0, 0, i )
(0, 0, r )
(0, 0, a ) (0, 0, l ) (4, 2, a)
(10 ,1, t ) (0, 0, y) (30, 3,c)
(0, 0, ˽ ) (0 ,0, m ) (19, 1, t) (0,0,k)
(4, 2, d ) (4, 1, n ) (16, 3, e) (9, 4, l)
Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽) (25, 1,eos)
LZ77
• Consider the string as :-
“CABRACADABRARRARRRAD”
With window size 13 and Look Ahead size of 6.
“LIMITATION OF LZ77”
• In the original LZ77 algorithm; Lempel and Ziv proposed that all string be
encoded as a length and offset, even string founds no match.
• In LZ77, search buffer is thousands of bytes long, while the look-ahead buffer is
tens of byte long.
• The encryption process is time consuming due to the large number of
comparison done to find matched pattern.
• LZ77 doesn’t have its external dictionary which cause problem while
decompressing on another machine. In this algorithm whenever there is no
match of any strings it encoded that string as a length and offset which will
take more space and this unnecessary step also increases time taken by the
algorithm
Lz77 by ayush

Lz77 by ayush

  • 1.
    LZ77 (Sliding Window) DataCompression By - Ayush Gupta
  • 2.
    LZ77 (SLIDING WINDOW) •First paper by Ziv and Lempel in 1977 hence named so. • Goes through the text in a sliding window consisting:- • Search Buffer. • Look ahead Buffer. • Text should be read from right to left in the buffer. • The encoder check the symbol in Look ahead buffer with search buffer considered here as dictionary. • Offset is the count from the dividing line between search and look ahead buffer. • Length is the span of string matched in look ahead buffer corresponding to search buffer. • Symbol is the next character after the string match.
  • 3.
    “How LZ77 works” •To encode the sequence in the look-ahead buffer, the encoder moves a search pointer back through the search buffer until it encounters a match to the first symbol in the look-ahead buffer. The distance of the pointer from the look-ahead buffer is called the offset. • The encoder then examines the symbols following the symbol at the pointer location to see if they match consecutive symbols in the look-ahead buffer. The number of consecutive symbols in the search buffer that match consecutive symbols in the look-ahead buffer, starting with the first symbol, is called the length of the match. • The encoder searches the search buffer for the longest match. • The encoder searches the search buffer for the longest match. Once the longest match has been found, the encoder encodes it with a triple <o, l, c>, where o is the offset, l is the length of the match, and c is the codeword corresponding to the symbol in the look-ahead buffer that follows the match.
  • 4.
    LZ77 (SLIDING WINDOW) SearchBuffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Input Text : sir˽sid˽eastman˽easily˽teases˽sea˽sick˽seals Note:- ˽ It represents space
  • 5.
    LZ77 (SLIDING WINDOW) sir˽sid˽ eastman˽ easily˽ teases˽ sea˽ sick˽se als sir˽sid˽eastman˽easily˽teases˽sea˽sick˽se als Search Buffer (Dictionary) Size = 30 symbols Look ahead Buffer Size = 10 symbols Dividing Line Text Movement Encoding scheme (offset, length, next symbol)
  • 6.
    LZ77 (SLIDING WINDOW) s ir˽sid˽ eastman˽ easily˽ teases˽ sea˽ sick˽ seal s ir˽ sid˽ eastman˽ easily˽ teases˽ sea˽ sick˽seal s Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (0, 0, s)
  • 7.
    LZ77 (SLIDING WINDOW) si r˽sid˽eastman˽easily˽teases˽sea˽sick˽seal s r˽sid˽eastman˽easily˽teases˽sea˽sick˽seal s SearchBuffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (0, 0, s) (0, 0, i )
  • 8.
    LZ77 (SLIDING WINDOW) sir˽sid˽eastman˽easily˽teases˽sea˽sick˽seals˽sid˽eastman˽easily˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (0, 0, s) (0, 0, i ) (0, 0, r )
  • 9.
    LZ77 (SLIDING WINDOW) sir˽ sid˽eastman˽easily˽teases˽sea˽sick˽sealssid˽eastman˽easily˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (0, 0, s) (0, 0, i ) (0, 0, r ) (0, 0, ˽ )
  • 10.
    LZ77 (SLIDING WINDOW) sir˽sid ˽eastman˽easily˽teases˽sea˽sick˽seals˽eastman˽easily˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) Encoding scheme: (0, 0, s)
  • 11.
    LZ77 (SLIDING WINDOW) sir˽sid ˽e astman˽easily˽teases˽sea˽sick˽sealsastman˽easily˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) Encoding scheme: (0, 0, s) (4, 1, e)
  • 12.
    LZ77 (SLIDING WINDOW) sir˽sid ˽ea stman˽easily˽teases˽sea˽sick˽sealsstman˽easily˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, ˽ ) (4, 2, d ) Encoding scheme: (0, 0, s) (4, 1, e) (0, 0, i ) (0, 0, a ) (0, 0, r )
  • 13.
    LZ77 (SLIDING WINDOW) sir˽sid ˽east man˽ easily˽ teases˽ sea˽ sick˽ sealsman˽easily˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, ˽ ) (4, 2, d ) Encoding scheme: (0, 0, s) (4, 1, e) (0, 0, i ) (0, 0, a ) (0, 0, r ) (10 ,1, t ) Take last occurrence of s and not (6 ,1, t ) if length is same for both
  • 14.
    LZ77 (SLIDING WINDOW) sir˽sid ˽eastm an˽easily˽teases˽sea˽sick˽sealsan˽easily˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (0, 0, s) (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) (4, 1, e) (0, 0, a ) (10 ,1, t ) (0 ,0, m )
  • 15.
    LZ77 (SLIDING WINDOW) sir˽sid ˽eastman ˽easily˽teases˽sea˽sick˽seals˽easily˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (0, 0, s) (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) (4, 1, e) (0, 0, a ) (10 ,1, t ) (0 ,0, m ) (4, 1, n )
  • 16.
    LZ77 (SLIDING WINDOW) sir˽sid ˽eastman˽easi ly˽ teases˽ sea˽ sick˽sealsly˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) (10 ,1, t ) (0 ,0, m ) (4, 1, n ) Encoding scheme: (8, 4, i)(0, 0, s) (0, 0, i ) (4, 1, e) (0, 0, a )
  • 17.
    LZ77 (SLIDING WINDOW) sir˽sid ˽eastman˽easil y˽ teases˽ sea˽ sick˽sealsy˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) (10 ,1, t ) (0 ,0, m ) (4, 1, n ) Encoding scheme: (0, 0, s) (0, 0, i ) (4, 1, e) (0, 0, a ) (8, 4, i) (0, 0, l )
  • 18.
    LZ77 (SLIDING WINDOW) sir˽sid ˽eastman˽easily ˽ teases˽ sea˽ sick˽ seals˽teases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (0, 0, s) (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) (4, 1, e) (0, 0, a ) (10 ,1, t ) (0 ,0, m ) (4, 1, n ) (8, 4, i) (0, 0, l ) (0, 0, y )
  • 19.
    LZ77 (SLIDING WINDOW) sir˽sid ˽eastman˽easily˽t eases˽sea˽sick˽sealseases˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (8, 4, i) (0, 0, l ) (0, 0, y ) (19, 1, t) (0, 0, s) (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) (4, 1, e) (0, 0, a ) (10 ,1, t ) (0 ,0, m ) (4, 1, n )
  • 20.
    LZ77 (SLIDING WINDOW) sir˽sid ˽eastman˽easily˽tease s˽ sea˽ sick˽ sealss˽sea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) (0, 0, a ) (10 ,1, t ) (0 ,0, m ) (4, 1, n ) (0, 0, l ) (0, 0, y ) (19, 1, t) (16, 3, e) Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i)
  • 21.
    LZ77 (SLIDING WINDOW) sir˽sid˽eastman˽easily˽teases˽sea˽ sick˽sealssea˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (4, 2, d ) (0, 0, a ) (10 ,1, t ) (0 ,0, m ) (4, 1, n ) (0, 0, l ) (0, 0, y ) (19, 1, t) (16, 3, e) Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽)
  • 22.
    LZ77 (SLIDING WINDOW) sir˽sid˽eastman˽easily˽teases˽sea˽ sick˽ seals˽sick˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽) (0, 0, i ) (0, 0, a ) (0, 0, l ) (4, 2, a) (0, 0, r ) (10 ,1, t ) (0, 0, y ) (0, 0, ˽ ) (0 ,0, m ) (19, 1, t) (4, 2, d ) (4, 1, n ) (16, 3, e)
  • 23.
    LZ77 (SLIDING WINDOW) sir˽sid˽eastman˽easily˽teases˽sea˽si c k˽sealsk˽seals SearchBuffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (4, 2, d ) (4, 1, n ) (16, 3, e) Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽) (4, 2, a) (30, 3,c) (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (0, 0, a ) (10 ,1, t ) (0 ,0, m ) (0, 0, l ) (0, 0, y ) (19, 1, t )
  • 24.
    LZ77 (SLIDING WINDOW) sir˽sid˽eastman˽easily˽teases˽sea˽si ck ˽seals˽seals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (4, 2, d ) (4, 1, n ) (16, 3, e) Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽) (0, 0, i ) (0, 0, r ) (0, 0, ˽ ) (0, 0, a ) (10 ,1, t ) (0 ,0, m ) (0, 0, l ) (0,0,y) (19, 1, t ) (4, 2, a) (30, 3,c) (0,0,k)
  • 25.
    LZ77 (SLIDING WINDOW) ss sir˽sid˽eastman˽easily˽teases˽sea˽sick˽s eal SearchBuffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, i ) (0, 0, r ) (0, 0, a ) (0, 0, l ) (4, 2, a) (10 ,1, t ) (0, 0, y) (30, 3,c) (0, 0, ˽ ) (0 ,0, m ) (19, 1, t) (0,0,k) (4, 2, d ) (4, 1, n ) (16, 3, e) (9, 4, l) Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽)
  • 26.
    LZ77 (SLIDING WINDOW) sir˽sid˽ eastman˽ easily˽ teases˽ sea˽sick˽ s eals Search Buffer (Dictionary) Look ahead Buffer Dividing Line Text Movement (0, 0, i ) (0, 0, r ) (0, 0, a ) (0, 0, l ) (4, 2, a) (10 ,1, t ) (0, 0, y) (30, 3,c) (0, 0, ˽ ) (0 ,0, m ) (19, 1, t) (0,0,k) (4, 2, d ) (4, 1, n ) (16, 3, e) (9, 4, l) Encoding scheme: (0, 0, s) (4, 1, e) (8, 4, i) (30,1, ˽) (25, 1,eos)
  • 27.
    LZ77 • Consider thestring as :- “CABRACADABRARRARRRAD” With window size 13 and Look Ahead size of 6.
  • 29.
    “LIMITATION OF LZ77” •In the original LZ77 algorithm; Lempel and Ziv proposed that all string be encoded as a length and offset, even string founds no match. • In LZ77, search buffer is thousands of bytes long, while the look-ahead buffer is tens of byte long. • The encryption process is time consuming due to the large number of comparison done to find matched pattern. • LZ77 doesn’t have its external dictionary which cause problem while decompressing on another machine. In this algorithm whenever there is no match of any strings it encoded that string as a length and offset which will take more space and this unnecessary step also increases time taken by the algorithm

Editor's Notes

  • #3 To encode the sequence in the look-ahead buffer, the encoder moves a search pointer back through the search buffer until it encounters a match to the first symbol in the look-ahead buffer. The distance of the pointer from the look-ahead buffer is called the offset. The encoder then examines the symbols following the symbol at the pointer location to see if they match consecutive symbols in the look-ahead buffer. The number of consecutive symbols in the search buffer that match consecutive symbols in the look-ahead buffer, starting with the first symbol, is called the length of the match.