Text Compression using Python

Swapnil Apr 14, 2021

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.

Project Files

Loading...
..
This directory is empty.

Comments (0)

Leave a Comment