COS 126 Prefix Code Assignment Checklist


Goals

  • Learn to use binary trees.

  • Learn about data compression.

  • Testing and Hints

  • There are many sample data files (with extension .pre) available in ftp.cs.princeton.edu/pub/cs126/prefix/. The input file consists of two parts. The first part is the preorder traversal of the tree. The second part is the string of 0's and 1's. There will be a single newline character separating the two parts. Note that if the original message contains whitespace characters, then the preorder traversal will contain these characters as well (but it will not contain any whitespace if the original message doesn't).

  • You may compare your results to our reference solutions by running the program uncompress126. To pause the output after each screenful, use:
    uncompress126 < monalisa.pre | more
    

  • Additional hints are available here.

  • Submission and readme  
  • Submit the following files:
    readme.txt uncompress.c
    
    You may submit additional files for the extra credit, but your main() function should still be in uncompress.c.

  • The readme.txt file should contain the following information. Here is a template readme file.

  • Name, precept number, high level description of code, any problems encountered, any help (if any) that you received, and any classmates with whom you collaborated.

  • Enrichment Links

  • See Project Gutenberg for an amazing selection of free etexts. You'll notice that the zip'd versions are roughly half the size of the corresponding raw text versions. The method of data compression is very similar to the one you are using on this assignment!



  • Kevin Wayne