Vincent Chu Tinkerer | Leader | Innovator

Product & Engineering leader in SaaS.
Passionate with technology. Worked at Electronic Arts and Apple before venturing into the startup world.

Huffman Compression
(Huffman Tree Compression)

My buddy in SFU was doing a compression program for his CMPT 201 class using Java. Since I was just taking 3 courses that semester, I had the time to play with it as well. However, I chose to do it in C++, and it definitely runs faster than its Java counterpart.

So, how to use it (Windows GUI)?

For so many people, Windows is the only thing they've used in their entire live. So, I also made a user friendly version of the program.

Encoding - What you do first is select a file to encode. Click "browse" besides the source field to select the file (in the encode panel of course). In the destination field, type a file name for the encoded file that the program is going to produce. Press Encode to begin the process. For most text files, you will note that the encoded file would be smaller than the original file. If the file is large, it might appear to be "not responding" while it is working.

Decoding - Select the file that you encoded previously using the browse function besides the source field (in the decode panel of course). In the destination field, type a file name for the decoded file that the program is going to produce - please make sure that you typed in the same file extension as the original file that you compressed. Again, if the file is large, it might appear to be "not responding" while it is working.

So, how to use it (DOS)?

Basically, you use it like how you used pkzip in the old days. It can usually compress text files really well, and no so good at files that are already compressed. The program should work with files that are less than 2GB.

To Compress:
1. In the directory/folder(whatever you call it) where the file you want to compressed and vince.exe are both stored, type:
"vince fileName.ext fileName2.ext". firstName.ext is the file you want to compress, and fileName2.ext is the file name you want to store the compressed file to.

To Decompress:
1. In the directory/folder(whatever you call it) where the compressed file and unvince.exe are both stored, type:
"unvince fileName.ext fileName2.ext". firstName.ext is the file that was previously compressed by vince.exe, and fileName2.ext is the file name you want to store the decompressed file to.

For example:
1. Download vince.exe to c:\
2. Download unvince.exe to c:\
3. Put a file you want to compress in c:\
4. Go to Dos prompt (In windows 9X/XP, click Start -> Run -> type "cmd") and c:\. Compress and decompress the file as instructed above.

Download File Download vincezip.exe