Skip to content

A standalone Python GUI for Q-ary Huffman encoding with frequency analysis, tree visualization, and compression metrics.

License

Notifications You must be signed in to change notification settings

Marouf-Haider/Qary-Huffman-Encoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Q-ary Huffman Encoder

Created by Marouf Haider
National Higher School of Mathematics, Cryptography Coding & Security

Email: haider.marouf@nhsm.edu.dz / ensmmarouf@gmail.com


About

This is a standalone Python application for Q-ary Huffman encoding and compression visualization.
You can analyze text, compress it with variable Q-values, visualize the Huffman tree, and compare compression performance.

No Python installation is required — just double-click the .exe.

⚠️ This implementation is educational and may contain unintentional errors. If you encounter issues, feel free to reach out.


How to Use

  1. Launch Huffman.exe (no installation needed).
  2. Enter your text or upload a file.
  3. Choose a Q-value (e.g., 2 for binary, 3 for ternary).
  4. Click Encode to generate encoded output.
  5. View:
    • Symbol frequencies
    • Huffman tree visualization
    • Compression metrics
  6. Export results using buttons:
    • Encoded text
    • Standalone decoder
    • Full package with metrics and JSON

Exported Files

If you use the Export Full Package option, it includes:

  • encoded_output.txt – the compressed bit string
  • huffman_decoder.py – a minimal decoder module
  • encoding_data.json – metadata and codes
  • README.md – this file

Requirements (for developers only)

  • Python 3.8+
  • matplotlib
  • ttkthemes (optional for GUI theme)

License

This software is released for educational and non-commercial use.
Contact Marouf Haider for more.


Contact

Email: haider.marouf@nhsm.edu.dz or ensmmarouf@gmail.com

LinkedIn: www.linkedin.com/in/haider-marouf-1149b1316