Coders Packet

Text Compression using Python

By Swapnil

Code in Python compresses a .txt file into a .bin file where the compressed file is approximately 50% of the size of the original file. or decompresses the .bin to .txt file.

Working - 

Implemented Huffman coding algorithm for lossless text compression.

According to user choice,

Code compresses a .txt file into a .bin file where the compressed file is approximately 50% of the size of the original file.
or decompresses the .bin to .txt file that is into its original form. 

About -

Code is in Python

Library used - heapq, os

Data Structures used - Hashing, Trees, Priority Queue, Dictionary, Heaps

To run -

$python3 Lossless Text Compression.ipynb

Place the absolute path of the file to be compressed or decompressed in the variable path and call the compression or decompression function for the work to be processed on the file.

Download project

Reviews Report

Submitted by Swapnil (Swapnil)

Download packets of source code on Coders Packet