Function File: c = lz77enco (m, alph, la, n)

Lempel-Ziv 77 source algorithm implementation. Where

c

encoded message (Mx3).

alph

size of alphabet.

la

lookahead buffer size.

n

sliding window buffer size.

See also: lz77deco.

Demonstration 1

The following code

 lz77enco ([0 0 1 0 1 0 2 1 0 2 1 0 2 1 2 0 2 1 0 2 1 2 0 0], 3, 9, 18)

Produces the following output

ans =

   8   2   1
   7   3   2
   6   7   2
   2   8   0

Package: communications