Skip to content

sertaac/filecompression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

File Compression Repository πŸ“¦

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.


πŸ” Purpose

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.


πŸ“ Current Modules

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.


πŸ”§ Requirements

  • 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.

πŸ› οΈ Upcoming Plans

Planned additions:

  • Run-Length Encoding (RLE)
  • DEFLATE (if manageable)
  • LZ77 / LZ78
  • Performance benchmarks

Feel free to use, modify, and share.

About

I share my learnings on compression algorithms in here.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published