Skip to content

suhanacharya/smlr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMLR

Abstract

Everyone is dependent on internet for day to day activities these days, the time required to transfer data through the network should be as minimum as possible. Trivial task should be performed with lesser time and important task should be give higher priority. This will create a balance in the network traffic. The main purpose of this project is to compress the text files into binary file in order to reduce the file size. Usually data which are fetched from the backend server can be of large size. These data should be compressed to smaller size to reduce the time required to fetch the data from server and also the time required to format the data to be received by the client and to be displayed in the client’s computer system. Huffman coding is a lossless data compression algorithm. The idea is to assign a variable-length codes to input characters, length of the assigned codes are based onthe frequencies of corresponding characters. The most frequent character gets the smallest code and the least frequent character gets the largest code. The variable-length codes assigned to input characters are Prefix Codes, that is the codes (bit sequences) are assigned in such a way that the code assigned to one character is not the prefix of code assigned to any other character. In the real world scenario, when the files are fetched from the server the files which the user receives will be compressed using Gzip technique. Gzip is based on the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding.

Purpose

The main purpose of this project is to compress the text files into binary file in order to reduce the file size. Usually data which are fetched from the backend server can be of large size. These data should be compressed to smaller size to reduce the time required to fetch the data from server and also the time required to format the data to be received by the client and to be displayed in the client’s computer system.

Scope

In the real world scenario, when the files are fetched from the server the files which the user receives will be compressed using qzip technique. Gzip is based on theDEFLATE algorithm, which is a combination of LZ77 and Huffman coding. This application provides the information regarding file, like it’s actual size of the file and the size of the file after compression. It displays he compression ratio along with the real time progress of the compression process and estimated time for the completion of the process.

Overview

Since everyone is dependent on internet for day to day activities these days, the time required to transfer data through the network should be as minimum as possible.Trivial task should be performed with lesser time and important task should be give higher priority. This will create a balance in the network traffic. This application usesHuffman text data compression encoding, to compress text file into binary file. With the help of tree and heap data structures, we are creating nodes which will be used to compare and generate the binary output file. This file is compressed to a smaller sized binary file.

How to run

If python isn't installed on your machine then do install. Once installed run the following command.

python main.py

or

python3 main.py

Output

Video.mp4

About

An implementation of Huffman Coding Algorithm for lossless text compression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages