CPSC 430 Spring 2003
Implement the Lempel-Ziv text compression algorithm
that we discussed
in class. You will need to write two separate programs: one for compression
and one for decompression. The
compression program should take at the command line the name of the
file to be compressed and should write a compressed file
of the same name with a .lz extension. The decompression
program should take the name of the file to be decompressed; it should
verify that it has a .lz extension, then write an uncompressed file of the
same name without the extension. Use the structure that we discussed
in class for your
Due Monday, March 24
Use a brute force search to find the longest matching substring.
- 13 bits for the pointer
- 4 bits for the length of the matched phrase
When your program works, compare it to the compress and gzip
programs on riddler. Look at how much compression is achieved and how
long the compression process takes for files of widely varying sizes.
Present and interpret your results.