This application is Python-based desktop tool that implements Huffman coding for file compression and decompression. It provides a user-friendly graphical interface for encoding (compressing) and decoding (decompressing) both text files and BMP image files using the Huffman algorithm.
- Compress and decompress text files
- Compress and decompress BMP image files
- Intuitive graphical user interface
- Real-time progress tracking
- Detailed result reporting (compression ratio, processing time)
- File browser for easy input and output file selection
- Python 3.6 or higher
- tkinter (usually comes pre-installed with Python)
- Pillow (PIL) library for image processing
- Clone this repository or download the source code.
git clone https://github.com/17AtGitHub/huffman-compression-application.git
cd huffman-compression-application
- Install the required dependencies:
pip install pillow
- Run the application:
python main.py
-
Use the GUI to:
- Select the input file
- Choose the output file location
- Select the file type (Text or Image)
- Choose the mode (Encode or Decode)
- Click "Process" to start the operation
-
The application will display the progress and results in the GUI.
-
Text Files:
- Encode: Compresses .txt files to .huf files
- Decode: Decompresses .huf files back to .txt files
-
Image Files:
- Encode: Compresses .bmp files to .huf files
- Decode: Decompresses .huf files back to .bmp files
Contributions to improve the Huffman Coding Application are welcome. Please feel free to submit pull requests or open issues to suggest improvements or report bugs.
- This application uses the Huffman coding algorithm for data compression.
- GUI is built using Python's tkinter library.
- Image processing is handled by the Pillow (PIL) library.