previous main page next

Dokumenthantering VT97:06

These are the exercises and references for the sixth class of the course Dokumenthanteringen


Exercises

The results of the exercises marked with * have to be handed in. The exercises marked with ? are optional obligatory exercises: you only have to hand in the results of one of them

  1. Our AIX work stations have three compression programs available: pack (creates .z files), compress (.Z) and gzip (.gz). Browse through the manuals (man 1 pack for pack) to find out what algorithms these compression methods are using. Then compress some big text file (smaller than 8Mb) and compute the compression factors for these compression methods. Which one is best?

  2. * In UNIX it is possible to search in a compressed file (gzip) without having to decompress it on disk:

    gunzip -c file.gz | grep importantWord

    Try to do the same in Perl: open a compressed file without having to decompressing it on disk but with the opportunity to process the original non-compressed file.

  3. * Design a compression method which can compress arbitrary files containing only ASCII characters (values 0-127). Try to implement the compression method in Perl. If you don't manage to implement it then hand in a detailed description of how it works together with the Perl code and a description of what is wrong with the code.


References


Last update: March 27, 1997. erikt@stp.ling.uu.se