{"id":27174778,"url":"https://github.com/piyushamukherjee/file-compressor","last_synced_at":"2025-08-10T03:33:02.875Z","repository":{"id":222000662,"uuid":"755987906","full_name":"PiyushaMukherjee/File-Compressor","owner":"PiyushaMukherjee","description":"About A Text file compression tool based on Huffman encoding algorithm.","archived":false,"fork":false,"pushed_at":"2024-02-11T17:07:53.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-15T01:28:03.612Z","etag":null,"topics":["cpp","dsa-project"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PiyushaMukherjee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-11T17:04:04.000Z","updated_at":"2024-11-25T17:27:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"811876d9-32e7-40f3-8c9f-e3593e637f13","html_url":"https://github.com/PiyushaMukherjee/File-Compressor","commit_stats":null,"previous_names":["piyushamukherjee/file-compressor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PiyushaMukherjee/File-Compressor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushaMukherjee%2FFile-Compressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushaMukherjee%2FFile-Compressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushaMukherjee%2FFile-Compressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushaMukherjee%2FFile-Compressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PiyushaMukherjee","download_url":"https://codeload.github.com/PiyushaMukherjee/File-Compressor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiyushaMukherjee%2FFile-Compressor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269672037,"owners_count":24457111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","dsa-project"],"created_at":"2025-04-09T12:16:05.479Z","updated_at":"2025-08-10T03:33:02.866Z","avatar_url":"https://github.com/PiyushaMukherjee.png","language":"C++","readme":"# File_Compressor\nA text file compression tool based on Huffman encoding algorithm. The tool enjoys the benefit given by huffman encoding algorithm, i.e, Lossless compression.\nWe can compress the data upto 30-40% without any loss in the data, saving 60-70% space. This comes very handy in case of cloud sharing. \n# UseCase\nImagine you have to send a 1GB data file, and you only have 500MB of internet data. No need to worry! Huffman encoding algorithm got you covered. After compression the file's size becomes somewhere around 300MB(not guaranteed) which can now be safely sent without any problems.\n# About the Algorithm\nHuffman coding, an optimal prefix-free binary code, is a renowned data compression technique designed by David A. Huffman in 1952. This ingenious algorithm is based on the principle of assigning shorter codes to frequently occurring symbols in a dataset, resulting in more efficient representation and compression. Huffman encoding achieves this by constructing a binary tree, known as the Huffman tree, where each leaf node corresponds to a symbol and is assigned a binary code based on its frequency in the input data. The algorithm employs a priority queue to efficiently merge nodes with the lowest frequencies until a single root node is formed. The resulting binary codes exhibit the desirable property of being prefix-free, ensuring that no code is a prefix of another. This characteristic simplifies decoding, as it enables unambiguous identification of each symbol in the compressed data.\nIt finds its unique applications in the real-world. Notably, in file compression algorithms such as ZIP and in network protocols where efficient data transmission is crucial.\n# Merits of the tool\n## Lossless Compression:\nHuffman coding is a lossless compression algorithm, meaning that the decompressed data is identical to the original.\n## Widely Used:\nHuffman coding is widely adopted and implemented in various applications, including file compression utilities (e.g., ZIP) and network protocols, attesting to its effectiveness.\n## Simple and Fast Decoding:\nThe decoding process in Huffman coding is straightforward and fast. The prefix-free nature of the codes ensures unambiguous decoding, making it efficient for both compression and decompression.\n# Demerits of the tool\n## Compression Overhead for Small Files:\nFor very small files or files with limited redundancy, the overhead introduced by the Huffman coding tree might result in a compressed file size that is larger than the original.\n## Complexity in Real-Time Applications:\nWhile Huffman coding is generally efficient, its adaptive nature and tree-building process might introduce complexities in real-time applications where encoding and decoding need to be performed quickly.\n## Limited Compression Improvement with ASCII Text:\nFor ASCII text, where each character already requires 8 bits, the potential for compression improvement is limited compared to scenarios where symbol frequencies vary widely.\n\n# Getting Started\n## Step1 : \nClone the repository(make sure git is installed)\n\n        git clone https://github.com/dave1725/File_compressor.git\n\n## Step2 : \nCompile the project source file using g++ or any compiler\nMake sure MingW is installed for windows and OSX.\n+ For LINUX\nFor linux install g++.\n        \n        apt-get install g++\n  \nCompiling the project.\n\n        g++ project.cpp - o project\n\nExecuting the project.\n\n        ./project\n\n+ For Windows\nInstall MinGW from https://sourceforge.net/projects/mingw/\n\nCompiling the project.\n\n        g++ project.cpp -o project\n\nExecuting the project.\n\n        ./project\n        \n## Step3 : \nFinally! Run the project executable file.\n\n# Members\n+ Krish Nariya\n+ Aakarsh Lohani\n+ Piyusha Mukherjee\n+ Nivedha Sriram\n+ Priyam Kotnala\n+ Dave Meshak\n\n# References\n+ https://www.geeksforgeeks.org/text-file-compression-and-decompression-using-huffman-coding/\n+ https://codereview.stackexchange.com/questions/195251/compression-decompression-using-huffman-coding-algorithm\n+ https://www.programiz.com/dsa/huffman-coding\n\n# License\nThis project is licensed under MIT license - Kindly refer the LICENSE file for details.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyushamukherjee%2Ffile-compressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiyushamukherjee%2Ffile-compressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyushamukherjee%2Ffile-compressor/lists"}