A simple command-line tool that compresses and decompresses text files using the LZ77 compression algorithm.
Features
π¦ Compresses any text file to .bin format
π Decompresses .bin files back to the original
π₯ Interactive terminal UI (z to compress, u to decompress)
π Built as a reusable static library (libzip.a)
File Structure
zip.c, unzip.c β Compression and decompression logic
Zipp.h β Header file for the public API
main.c β Simple interface to interact with the user
libzip.a β Compiled static library
How to Compile
gcc -c zip.c -o zip.o gcc -c unzip.c -o unzip.o ar rcs libzip.a zip.o unzip.o gcc main.c -L. -lzip -o compress_tool
Usage
./compress_tool for zip enter z ,for unzip enter u : z file name : hobbit.txt
./compress_tool for zip enter z ,for unzip enter u : u compressed file name (without .bin): compres
Output
Compressed file: compres.bin
Decompressed file: output.txt
Made by Braa jbareen