This repository is dedicated to exploring and implementing various file compression algorithms. Each folder in this repository represents a specific algorithm or approach, complete with source code, documentation, and practical examples.
The goal is to study how different compression algorithms work under the hood and to share working C or Python implementations with detailed explanations and usage examples. This is a learning-oriented project aimed at building a deeper understanding of how file compression works.
The first implemented algorithm is Lempel-Ziv-Welch (LZW). Inside this folder:
- β A working C implementation.
- β Dictionary-based compression logic.
- β Console-based interaction for compressing custom strings.
- β Comparison between original and compressed sizes.
π Check out the
README.md
inside the folder for more details.
A second module implementing Huffman Coding. Inside this folder:
- β A working Python implementation.
- β Frequency-based binary tree construction.
- β Character-to-binary encoding via Huffman Tree traversal.
- β Console-based input and encoding visualization.
- β Displays compression ratio and code mappings.
π Check out the
HuffmanCode_v0.1.py
script for a complete demonstration.
- For LZW: GCC or any standard C compiler.
- For Huffman: Python 3.10+ (due to type hints like
list[str]
) - Basic understanding of C or Python programming and terminal commands.
Planned additions:
- Run-Length Encoding (RLE)
- DEFLATE (if manageable)
- LZ77 / LZ78
- Performance benchmarks
Feel free to use, modify, and share.