Project: A File Compression Tool

This optional project accompanies Lecture of Week 4 of the course Algorithm Design and Analysis.


This project is optional. Submitting a complete and good project in time brings one or two award points !

The project is individual and personal work. Plagiarism from any source is considered a serious offence. If a project presented by a student is detected as not being the result of his own work, this will lead to failing to pass the ADA exam: projects are optional, you do not have to do them - but if you do, then submit only your own work!

The project has a hard deadline: 07.04.2023 for the simple version and 18.04.2023 for the two-phase version. You must submit your projects using the corresponding assignments on the Virtual Campus. A submission must contain the source code and a readme file explaining your work.

Students will also do a public presentation of their projects in class with discussions and questions.

If you have questions related to this project, pleas address them by VirtualCampus messages or by email to ioana.sora@cs.upt.ro

Project Requirements

Implement a FileCompresser tool. The tool takes following arguments in the command line:

FileCompresser mode inputfile outputfile

where

mode can be -c or -d, meaning compression or decompression

The tool must accept for compression files of any type and any size.

After using the tool for a sequence of compression followed by decompression, the obtained file must be identical with the original file.

The tool may use either Huffman or LZW algorithms presented in the lecture. Output files must be binary files, and bitwise operations used where necessary.

You can get a second award point if you implement an optimized compression tool that works in two phases - running first LZW on the original file and then in the second phase, running Huffman on the output of the first phase. The tool must be complete (implement compression and decompression).