A C compressor, based on Adaptive Huffman Coding (FGK)
The project itself doesn't require anything more than gcc
, but some of the make targets (like massif, valgrind, callgrind) require the following debugging tools.
- Valgrind
- Python
- xdot
- Pandoc
VIZ can be compiled with the following command:
make
The output will be a viz
binary, that can be called with ./viz
.
Warning: massif, valgrind and valgrind WON'T work if INVERTED_COMPRESSION_FLAG is set to 1 (check the define.h file)
Compiles the debug
version of Viz (viz
).
Compiles a release version (optimized, with no debugging symbols and no debugging messages). The output file is named viz-release
.
Performs the tests specified in the main.c file. When they fail, the make build will fail to have a better integration w/ Jenkins.
Generates a debugging version of viz compressor. This version won't be optimized, but it will include all the debugging symbols needed in case of problems. Watch out, the debugging mode is really verbose. You have been warned.
This target compiles the debug version of Viz, and creates a viz.massif
file that is then automatically opened with massif-visualizer
.
Same as massif
, but tested against the viz-test
binary (with no arguments)
Same as massif
but tested against the viz-release
binary. The debug arguments are used.
Performs a Valgrind check on the debug
binary.
Generates a viz-debug.callgrind
file of viz
(debug).
After the file is generated, it is converted with python utilities/gprof2dot/gprof2dot.py
to a .dot
file that is then automatically visualized with xdot
.
Same as callgrind
, but using the viz-release
binary
Does the same as callgrind
but uses the DEBUG_ARGS_ALICE
arguments instead (it does compress the test/files/provided/alice.txt
)
Same as callgrind_alice
but, uses the viz-release
binary.
Builds the documentation. The generated artifacts are then written to docs/{readme,documentation}.pdf
Performs a cleanup of the directory (warning: *.viz files are removed too!)
Compression is performed with viz -c output-file.viz input-file
, where input-file
can be either a file or a directory.
You can decompress a .viz
file with viz -d input-file.viz
.
Depends on INVERTED_COMPRESSION_FLAG (check define.h)
INVERTED_COMPRESSION_FLAG = 1
VIZ compressor v2.0.0 (R-2.0.0-24-g4d0dc0b-dirty)
Compress: viz -c inputfile output.viz
Extract: viz -d input.viz
INVERTED_COMPRESSION_FLAG = 0
VIZ compressor v2.0.0 (R-2.0.0-24-g4d0dc0b-dirty)
Compress: viz -c output.viz inputfile
Extract: viz -d input.viz
First commit
Deadline
Adaptive Huffman Coding - FGK - Stringology.org
Adaptive Huffman Coding - Wikipedia
Adaptive Huffman Coding - The Data Compression Guide
Adaptive Huffman Coding - cs.duke.edu
Visualizing Adaptive Huffman Coding - Ben Tanen
Array Implementation for Complete Binary Trees