Realizing a compress/decompressor program based on Huffman Tree, by C++.
This repo is for the USTC Data Structure course project.
Three modes are supported:
-
Interactive mode:
./compress
, then you will be asked to choose (de)compress mode and input the path of the file you want to compress/decompress -
Command-line compress mode:
./compress -c <input_file>
, then the compressed file will be outputted with suffix.huff
. -
Command-line decompress mode:
./compress -d <input_file>
, then the decompressed file will be outputted with infix(dezip)
See Makefile
for other options.
Compile the program:
make
Run the (de)compressor on test files from ./tests/
:
make test
Compress a specific file:
./compress -c ./tests/text.txt
Decompress a specific file:
./compress -d ./tests/text.huff