Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZIP File Compression System

A high-performance file compression and decompression system built in C++17 using a hybrid compression approach that combines LZ77 Sliding Window Compression and Huffman Entropy Coding, inspired by the DEFLATE algorithm used in modern ZIP utilities.

Features

  • Compress and decompress text files efficiently.
  • Hybrid compression pipeline using LZ77 + Huffman Coding.
  • Binary bit-packing for reduced storage overhead.
  • Command-line interface for compression and decompression.
  • Interactive web-based GUI for file selection and compression statistics.
  • Displays compression ratio, execution time, and token statistics.

Algorithms Used

  • LZ77 Sliding Window Algorithm – Detects repeated patterns and replaces them with references.
  • Huffman Coding – Generates optimal prefix codes based on character frequencies.
  • Bit Packing – Stores encoded data efficiently in binary format.

Tech Stack

  • C++17
  • STL (Vectors, Queues, Maps, Priority Queues)
  • HTML, CSS, JavaScript
  • Python Backend Server

Project Highlights

  • Designed a complete compression pipeline similar to the DEFLATE algorithm.
  • Implemented custom serialization and deserialization of Huffman tables.
  • Built a user-friendly interface to visualize compression statistics and output files.
  • Optimized for fast execution and low memory usage.

Usage

g++ -std=c++17 -O2 -o zipper main.cpp

# Compress
./zipper compress input.txt output.zc

# Decompress
./zipper decompress output.zc restored.txt

Learning Outcomes

  • Design and Analysis of Algorithms
  • Data Compression Techniques
  • Greedy Algorithms
  • Trees and Priority Queues
  • File Handling and Binary Serialization
  • Full-stack integration of C++ applications with a web interface

This project demonstrates the practical implementation of real-world compression algorithms and showcases strong problem-solving, algorithmic thinking, and system design skills.

About

ZIP File Compression System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages