Huffman Encoder (ITS8020)

Allikas: Kursused
Mine navigeerimisribale Mine otsikasti

The Huffman encoder assignment helps to discover the wonderful world of pointers, debugging and segmentation faults.

Your task is to implement an Hufmann encoder for statistical compression in C. The task is described on this old page; ignore its presentation guidelines with Tanel Tammet: send them to me.

The description of the algorithm.


If you want to predict your grade you might find following helpful:

  • 10p: Compresses and decompresses some regular text files (this is mandatory) the .c file of your program for example
  • 10p Compresses and decompresses most input you can have occasional errors with binary files
  • 5p: Compresses and decompresses almost everything program can work with all non-tricky inputs
  • 5p: Compresses and decompresses even the wierd files program can work with tricky inputs
  • 5p: Accepts stdin/stdout when no options or -d are present
   myhuf < asd > asd.out
   myhuf -d < asd.out > asd2
  • OR accepts file name arguments for both input and output files
   myhuf asd asd.out
   myhuf -d asd.out asd2
  • 1p: Has a working makefile (or "make programname" works)
  • 1p: Returns 0 on successful exit; nonzero on any errors
  • 1p: Sends error messages to stderr
  • 1p: Program is not slow
  • 1p: program does not crash

+1p per week up to 3, when presented earlier than the deadline