- code.c includes implementation to read/write singular bits
- node.c node functionality for the priority queue
- pq.c Priority Queue data structure made by myself
- stack.c Stack data structure made by myself
Compresses the input file (default stdin) using huffman encoding. The resulting compressed file is then written to output (default stdout).
If the provided output file does not already exist, it will be created by the program.
Decompresses the compressed input file (default stdin), reversing the effect of the huffman encoding process. The resulting uncompressed file is written to the output (default stdout).
If the provided output file does not already exist, it will be created by the program.
Usage: ./encode [options]
A Huffman encoder.
Compresses a file using the Huffman coding algorithm.
USAGE
./encode [-h] [-i infile] [-o outfile]
OPTIONS
-h Program usage and help.
-v Print compression statistics.
-i infile Input file to compress.
-o outfile Output of compressed data.A Huffman decoder.
Decompresses a file using the Huffman coding algorithm.
USAGE
./decode [-h] [-i infile] [-o outfile]
OPTIONS
-h Program usage and help.
-v Print compression statistics.
-i infile Input file to decompress.
-o outfile Output of decompressed data.
Ensure that the files:
"encode.c"
"decode.c"
"defines.h"
"header.h"
"node.h"
"node.c"
"pq.h"
"pq.c"
"code.h"
"code.c"
"io.h"
"io.c"
"stack.h"
"stack.c"
"huffman.h"
"huffman.c"
"Makefile"Ensure all the files are inside the same directory.
Open the terminal in the directory and type "make" Alternatively you can type "make all" to make all the executables, or "make encode" or "make decode" to make a specific
Use the usage methods of ./encode and ./decode are located above in the "Command Line Options" section
You may also use the -h with the program to print the usage to the terminal instead of looking through the README
Type "make clean" to delete all derived files except the created binaries. type "make spotless" to delete all derived files includeing the created binaries.