Algoritma LZW Compression
May 4th, 2008 | By thenuxer | Category: KomunitasAlgoritma LZW Compression
BEGINs = next input character;
while not EOF
{ c = next input character;
if s + c exists in the dictionary
s = s + c;
else
{ output the code for s;
add string s + c to the dictionary with a new code;
s = c;
}
}
output the code for s;
END