Project: Data Compressor

About halfway into the 15-211 course, the basics on data compression and compression algorithms are covered. Specifically, during the Spring 2009 semester, LZW Compression and Huffman encodings were stressed while the Burrows-Wheeler Transform was touched upon as well.

The lab assignment during this part of the course was to write, in Java, a PriorityQueue (which functions almost1 exactly as the one in java.util does), a Huffman Compressor, and an LZW Compressor. I used my PriorityQueue data structure in my implementation of the Huffman Compressor. Additionally, both of my compression algorithms were made to work not only to compress strings, but any source of bytes of data (files, streams, etc.).

More than anything, this project in particular taught me the importance of unit testing. Because of the nature of the assignment, there were so many places to make mistakes; by unit testing my code every step along the way I was able to avoid hours of searching for one line bugs. More importantly, I got into a habit of testing my code in small chunks instead of all at once.

Interested in this project? Let me know!

Your Name
Your Email

1By the class assignment specification, I implemented all of the constructor's given by the API, and the following methods:

void comparator()
,
int size()
,
void offer(T o)
,
T poll()
,
T peek()
, and
Iterator<T> iterator()
[except the iterator returned did not support the remove() method].