Skip to content

aklsh/Huffman-Encoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Huffman Coding

MIT license Version Build status Downloads

This repository supplements my blog post on huffman encoding.

Requirements

Language

This project is written in C++11. For user comfort, I have also included a makefile that uses g++ as the compiler. Install g++ if you want to do an automatic compilation and running of the program.

Install

  • Clone this repository with git clone https://github.com/aklsh/huffman-coding
  • You can also download this repository by clicking on the big green button near the top of this page. clone or download

Usage

I have included a makefile that will automatically do all the compilation and running of the program. You have to only specify the input file and the output file to the program.

make input="<path of input file>" output="<path of output file>"

The files have to be TEXT FILES ONLY (.txt) .

Organization of files

main.cpp - contains the main() for the program.
huffman.h - contains declaration of all classes and functions.
huffman.cpp - contains definitions for all functions (including member functions of classes) declared in huffman.h.
Makefile - a bash script to automatically compile and run the program.
sample inputs/ - folder containing a few sample input text files.

Some example Outputs

example file content example codes example compressed file

Contributing

PRs-welcome

Please feel free to submit pull requests to this repository!

License

MIT © Akilesh Kannan