Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harshaexplorer/huffman-compression
https://github.com/harshaexplorer/huffman-compression
data-structures lossless-compression-algorithm python tkinter
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/harshaexplorer/huffman-compression
- Owner: HarshaExplorer
- Created: 2024-01-11T11:31:26.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-10-20T21:43:08.000Z (2 months ago)
- Last Synced: 2024-10-21T02:09:53.919Z (2 months ago)
- Topics: data-structures, lossless-compression-algorithm, python, tkinter
- Language: Python
- Homepage:
- Size: 14.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Huffcompress: Data Compression and Decompression Tool
![huffcompress-logo](https://github.com/aagarwal32/Huffcompress/assets/152243328/4f7e0296-5e59-4f5c-8cb9-6f40884572d6)
## AuthorsHarshavardan Yuvaraj ([LinkedIn](https://www.linkedin.com/in/harsha-yuvaraj/))
Arjun Agarwal ([LinkedIn](https://www.linkedin.com/in/agw02/))## Description
Huffcompress is a specialized file compression and decompression tool designed mainly for plain text, including programming files and text files. The tool employs the Huffman algorithm, assigning smaller binary codes to frequently occurring characters and larger codes to those that appear less frequently. This optimization is facilitated through binary trees and a min-heap priority queue, prioritizing characters based on their frequency and organizing them into a tree structure during traversal.This approach results in a ~2:1 compression ratio, reducing the string size by approximately 50%! Additionally, the tool generates a serialized string representing the Huffman tree in postorder notation for decompression. All necessary decompression data is efficiently packed as binary digits within the compressed file, seamlessly unpacked during the decompression process.
Upon compression, the tool creates a newly generated directory with a random name at the same location as the original file. The compressed file, marked with a ".huff" extension, is placed within this directory. Only files with this extension can undergo decompression. This systematic approach ensures both efficient file management and reliable compression and decompression processes.
For user convenience, we additionally designed a Graphical User Interface (GUI) built with Tkinter for Huffcompress.