- Also works on smaller files
- compression rates up to 87%! (normally around 50%) (and even more under unrealistic circumstances :) )
1 bytes - Magic Byte of lzip file [0x23] [for checking if file is actual lzip]
1 byte - length of following bit alignments
n bits - bit alignments to fill up to full bytes
2 bytes - Length of coming huffmann tree
n bytes - The serialized huffmann tree [which holds bit - char assignment]
n bytes - The actual encoded data using the tree
git clone https://github.com/the-lightstack/lzip.git
cd ./lzip
chmod +x ./lzip
sudo mv ./lzip /usr/bin
pip3 install -r requirements.txt
lzip -h
lzip -c <file to compress>
Default output to out.lzip
lzip -d <file to uncompress>
Default output to plain_data.txt
lzip [-d/-c] <file> -o <filename>
Writes output to specified file
- Text files: ~ 50%
- ELF-Binaries: ~ 35%
- Images: ~ 2-5%
- Add
-o
parameter to define output file - Fix failure when encountering null-bytes ( which prevents from zipping most non-text files)