Giter Site home page Giter Site logo

compress-and-decompress-files-using-huffman-coding's Introduction

compress-and-decompress-files-using-huffman-coding

  • This is a program to compress and decompress a file using huffman coding algorithm.
    Note: the program compress only text files

Getting Started

- If you know how to compile c program you can use any c complier.
- If you don't know how to compile c program with multiple directories and files you need to have gcc compiler, git and Makefile installed on your system and follow the steps bellow:
  1. Open your terminal or command line
  2. Clone this repository by typing this command: git clone https://github.com/Abderrahmanehocine/compress-and-decompress-files-using-huffman-coding.git
  3. Go to the directory that contain the files of the code: cd compress-and-decompress-files-using-huffman-coding
  4. Compile the program using the Makefile(Type make in the cmd): make
  5. Move the text file that you want to compress in the directory that contain the main.c file
  6. To run the program type: ./huffman -c file1.txt file2.txt

file1.txt: is the name of the file that you want to compress
file2.txt: the name of the file that you want the compressed data will be in it (file2 will be created automatcly you just need to give it a name)

Example

- I have a text file contain data that I want to compress, the neme of the file is: data.txt, and I want the compressed data to be in a file named: output.txt
- The run command is: ./huffman -c data.txt output.txt

Output

- The program will create a file names output.txt(depand on the name that you want) and write the huffman tree with the code of the data

Decompress

- If you want to decompress the file you just need to run the program again using this command: ./huffman -d ouput.txt data1.txt
- I names the file data1.txt just to compare id the data will be the same with my previous data in the file data.txt

Contact

- If you have any question contact me at : [email protected]

compress-and-decompress-files-using-huffman-coding's People

Contributors

abderrahmanehocine avatar

Watchers

 avatar

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.