Sie sind auf Seite 1von 43

File Compression Using Huffman Algorithm

Developed By : Mansuri Amin R. (MCA-20) Vaja Rajesh K. (MCA-59) Guided By: Prof. H. N. Shah. Assistant Professor, MCA Department, DDU, Nadiad Submitted To : Faculty of Management & Information science, Faculty of Technology. `

Project Objective

Support user to compress and decompress text file. Provide a Better understanding Compression Algorithm. of Huffman File

Facilitate user to understand/study the how algorithm is work.

Project Scope

This project will develop and deliver a new application and this is a s study based project. The new application enable you can reduce the size of any text file and allowed data accuracy and save disc space. The new application can give the idea and better understanding to who study the Huffman coding algorithm technique we can use in the real life application. To make the existing system more efficient.

About Huffman Algorithm

It was developed by David A. Huffman while he was a Ph.D. student at MIT, and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".

David A. Huffman

About Huffman Algorithm

Huffman coding is an encoding algorithm used for lossless data compression. Lossless data compression is a class of data compression algorithms that allows the exact original data to be reconstructed from the compressed data. The term lossless is in contrast to lossy data compression, which only allows an approximation of the original data to be reconstructed, in exchange for better compression rates.

Step for Huffman Algorithm


Scan text to be compressed and calculate occurrence of all characters. Sort or prioritize characters based on number of occurrences in text. Build Huffman tree based on prioritized list. Perform a traversal of tree to determine all code words. Scan text again and create new file using the Huffman codes.

Existing System

Existing system refers to the system that is being followed till now. The main disadvantage of this system is that the users depend on third party software's like winzip, winrar, Stuff etc. The existing system requires more computational time, more manual calculations, and the complexity involved in Selection of features is high. .

Drawback Of Existing System

Deficiency of Data accuracy Time consuming. The users depend on third party software's like winzip, winrar, Stuff etc.

Proposed System

The aim of proposed system is to develop a system of improved facilities. The proposed system tries to eliminate or reduce difficulties up to some extent. The proposed system is file/folder compression or decompression based on the Huffman algorithm. The proposed system will help the user to consume time. The proposed system helps the user to work user friendly and he can easily do the file compression process without time lagging. The system is very simple in design and to implement. The system requires very low system resources and the system will work in almost all configurations.

Advantage of Proposed System

The system is very simple in design and to implement. The system requires very low system resources and the system will work in almost all configurations. Ensure data accuracy and Save disk space Minimum time needed for the file compression. The user need not depend on third party software's like winzip, winrar, Stuff etc.

Analysis & Design : Use Case Diagram

H ffm S u an ystem
* * E nter Text or text file uses calculate frequency uses uses

U ser

generate H uffm an tree H uffm codeword an

Analysis & Design : Sequence Diagram Enter Text

Analysis & Design : Sequence Diagram - View Result


Sequence diagram of View Result

User

UI

Huffman System

Enter text file or folder

Display Frequency of each Symbol

Display probability of symbol

Display Huffman Tree

Display Code Words

Analysis & Design : Activity Diagram: Enter Text

Analysis & Design : Activity Diagram - View Result

Analysis & Design : Class Diagram

UI : First Screen

Note : The first page of System

UI : Operation Menu Screen

UI : Input Menu Screen

UI : Input Text Menu Screen

UI : Input New File Menu Screen

UI : Input Save DialogBox Screen

UI : Input New File Screen

UI : Input Open Folder Screen

UI : Input Open DialogBox Screen

UI : Input Folder Open Screen

UI : Sample Text

Note : This screen display the file that user choose as open

UI : Result Menu

Note : This screen display all option result menu and user select Frequency of character option

UI : Frequency of character Table Screen

Note : This screen display frequency of character of currently selected file.

UI : Huffman Tree Screen

Note : This screen display Huffman Tree for currently selected file.

UI : Codeword Screen

Note : This screen display Huffman Codeword for each character in currently selected file.

UI : Encoding Screen

Note : This screen display user select Encoding for currently selected file.

UI : Encoding Screen

Note : This screen display the compress contain of the of currently selected file.

UI : Sample Screen

Note : This screen display the content of Test File.

UI : Compress Test File Screen

Note : This screen display the compress file of test file.

UI : Compress Size screen

Note : This screen display the size of original and compress file .

UI : Decompress Option Screen

Note : This screen display user select Decompress option.

UI: Open Dialog box for tree File Screen

Note : This screen display open dialog box for Huffman tree file.

UI : Open Dialog box for Compress file Screen

Note : This screen display open dialog box for Compress file.

UI : Decompress Screen

Note : This screen display original content.

Current research and future directions

With the advancements in compression technology, it is now very easy and efficient to compress video files. Various video compression techniques are available. The most common video compression standard is MPEG (Moving Picture Experts Group)[31]. It is a working group of ISO/IEC charged with the development of video and audio encoding standards. An excellent follow-up paper for this one would be to investigate the more sophisticated versions of Huffman coding algorithms. In future , the algorithms achieve much better compression ratios and are better able to compete with todays tools.

Bibliography

Books: JAVA 2 Complete Reference (5th Edition) By Herbert Schildt core java volume 1 by horstmann and cornell core java volume 2 by horstmann and cornell Web Sites: http://en.wikipedia.org/wiki/Huffman_coding http://www.cprogramming.com/tutorial/computersciencetheory/h uffman.html http://www.daniweb.com/software-development/c/code/216267 http://www.javaclass.info/generics/queue/priority-queue.php

Das könnte Ihnen auch gefallen