Coder Social home page Coder Social logo

huffmanencoding's Introduction

About

This is a sample huffman encoder/decoder I have written for SWE 501 class @ Bogazici University.

This is the first and only thing I have written in C++, so any advice and suggestions to make it more efficient, reliable, standard or just beautifull will be greatly appreciated.

Compile (C++ 11)

g++ -O0 -g3 -Wall -c -fmessage-length=0 -o huffman.o huffman.cpp

g++ -o huffman huffman.o

Usage

Usage: [OPTION] [Parameter]

Options:

-e: Encode file

-d: Decode file

Parameters:

-i [FILE]: Input file

-o [FILE]: Output file

-t [FILE]: Huffman table

-s [NUMBER]: Block size (default:1)

-v: Print verbose output

-h: Print help

Sample

Encode input.txt with block size 3, store huffman table as huffman.txt and encoded output as output.txt

huffman -e -i input.txt -h huffman.txt -o output.txt -s 3

Decode input.txt with huffman table huffman.txt and store decoded output as output.txt with verbose output

huffman -d -i input.txt -h huffman.txt -o output.txt -v

huffmanencoding's People

Contributors

sinag avatar

Stargazers

 avatar

Watchers

 avatar

huffmanencoding's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.