Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# HuffCode – Lossless File Compression using Huffman Encoding

HuffCode is a file compression and decompression utility implemented in C using the Huffman Coding algorithm. The project applies greedy algorithms, priority queues, binary trees, and bit-level file operations to achieve efficient lossless compression of text files.

## Features

* Lossless text file compression and decompression

* Huffman Tree construction based on character frequencies

* Custom Min-Heap Priority Queue implementation

* Bit-level encoding and decoding

* Command-line interface

* Modular implementation using separate source files

## Tech Stack

* C

* Data Structures

* Greedy Algorithms

* File Handling

* Bit Manipulation

## Project Structure


include/

└── huffman.h



src/

├── heap.c

├── tree.c

├── bitstream.c

├── huffman.c

└── main.c



Makefile

README.md

## Build

make

## Run

./huffcode compress input.txt output.huff

./huffcode decompress output.huff restored.txt

## Key Concepts

* Huffman Encoding

* Prefix-Free Codes

* Min Heap Operations

* Binary Tree Traversal

* Frequency Analysis

* Bit-Level File I/O

## Learning Outcomes

* Implemented core data structures from scratch.

* Applied greedy algorithms to real-world compression problems.

* Worked with low-level binary file operations.

* Optimized storage using variable-length prefix codes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages