Command line compression tool using DEFLATE and a custom archive format (.mzp).
Requires:
g++- C++17 support
makeIf your environment does not support Makefiles:
g++ -std=c++17 -Iinclude -c src/lempel_ziv.cpp -o build/lempel_ziv.o
g++ -std=c++17 -Iinclude -c src/token_encoder.cpp -o build/token_encoder.o
g++ -std=c++17 -Iinclude -c src/bitwriter.cpp -o build/bitwriter.og++ -std=c++17 -Iinclude src/compress.cpp \
build/lempel_ziv.o \
build/token_encoder.o \
build/bitwriter.o \
-o bin/compress.exeg++ -std=c++17 -Iinclude src/decompress.cpp \
build/lempel_ziv.o \
build/token_encoder.o \
build/bitwriter.o \
-o bin/decompress.exeg++ -std=c++17 -Iinclude \
src/compress.cpp \
src/lempel_ziv.cpp \
src/token_encoder.cpp \
src/bitwriter.cpp \
-o bin/compress.exeg++ -std=c++17 -Iinclude \
src/decompress.cpp \
src/lempel_ziv.cpp \
src/token_encoder.cpp \
src/bitwriter.cpp \
-o bin/decompress.exeAdd:
.../DEFLATE/binto your system environment variables.
Otherwise, you must be inside:
.../DEFLATE/binto run the executables.
Executables should be run as:
./compress.exe
./decompress.execompress helpOutput:
Usage: compress <source> <destination>
Arguments:
source:
path to the file/directory to compress
destination:
path to directory where output will be written
use . for current directorydecompress helpOutput:
Usage: decompress <source> <destination>
Arguments:
source:
path to the .mzp file to decompress
destination:
path to the directory where file will be extracted
use . for current directoryAlways enclose paths in double quotes:
"./path/to/file"to avoid path parsing issues.
include/
│
├── bitwriter.hpp
├── lempel_ziv.hpp
├── minheap.hpp
└── token_encoder.hpp
src/
│
├── bitwriter.cpp
├── compress.cpp
├── decompress.cpp
├── lempel_ziv.cpp
└── token_encoder.cpp- Canonical Huffman encoding for LZ tokens
- Better token parsing system
- Lazy matching for LZ encoding optimization
- Streaming decompression improvements
- Better archive metadata handling
Anabil Roy