Skip to content

This project demonstrates a hybrid implementation of Huffman Encoding, combining GPU-accelerated frequency analysis using CuPy with traditional CPU-based Huffman tree construction and encoding. It runs smoothly on Google Colab with GPU support.

License

Notifications You must be signed in to change notification settings

anodicpassion/Hybrid_GPU-Accelerated_Huffman_Encoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hybrid_GPU-Accelerated_Huffman_Encoding

This project demonstrates a hybrid implementation of Huffman Encoding, combining GPU-accelerated frequency analysis using CuPy with traditional CPU-based Huffman tree construction and encoding. It runs smoothly on Google Colab with GPU support.

Click here to open in Colab


📌 Features

  • ✅ Frequency counting on GPU using CuPy for high-speed analysis
  • ✅ Huffman tree construction on CPU
  • ✅ Compression of large strings with customizable input
  • ✅ Fully executable on Google Colab (no local GPU required)

🔗 Run in Google Colab

👉 Click here to open in Colab


📦 Dependencies

  • Python 3.x
  • CuPy (compatible with CUDA 12.x on Colab)

Install CuPy in your Colab notebook with:

!pip install cupy-cuda12x

🧠 How It Works

  1. Input a large text/string to be compressed.
  2. GPU acceleration is used for counting symbol frequencies.
  3. Huffman tree is built on the CPU from the frequency table.
  4. Data is encoded into a compressed bitstring using the generated Huffman codes.

📁 File Structure

.
├── LICENSE
├── README.md
├── file_structure
├── main.py
└── main_notebook.ipynb

1 directory, 5 files

📜 License

This project is licensed under the MIT License.

About

This project demonstrates a hybrid implementation of Huffman Encoding, combining GPU-accelerated frequency analysis using CuPy with traditional CPU-based Huffman tree construction and encoding. It runs smoothly on Google Colab with GPU support.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published