Open AndrewLiu666 opened 4 months ago
Par and I Noga will code review this
Your project is well written and I appreciate all the hard work you put into it as it looks pretty complicated feature to implement. As complicated as the algorithm is to understand, the code is still neat, organized, and easy to follow.
Suggestions/observations
Overall
Overall your project is impressive and well written. I enjoyed playing around with it and see how it works. Great job!
Tested this with a variety of inputs and it works great. It would be fun to provide compression ratios / analysis of these files (for a future student to look into...)
Definitely add the docs file, and you can do the javadoc for the more complex functions if you want. But otherwise this is perfect and a monumental effort!
Note: I'm not going to take off any points for the missing docs, but do it at some point please ;-)
Implement two commands "compress" and "decompress".
The 'compress' command takes two arguments, the first is the original file name and the second is the name of the expected compressed output file. The "decompress" command takes two parameters, the first is the original compressed file name and the second is the name of the expected decompressed output file. In the compressed file, the first N lines are Huffman code tables. Then after two blank lines comes the Huffman string, using spaces to separate each Huffman code.