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