Giter Club home page Giter Club logo

data-compression's Introduction

Data Compression

The implementation of various compression techniques.

Hello all the readers, this is my new repository which consists of the implementation of the various data compression techniques that I'll be learning in the upcoming months.

I like to code in Python, so every code that I'll put up here will be in python (sorry if you don't code in python, but can't help it😜). Anyways, along the time when I'll be commiting more such techniques after implementing them, I'll update this section with the contents.

The subfolders carry the name of the technique and within each subfolder there is the code. Very soon, I'll be adding a separate readme for each of the methods along with code snippets and proper explanation. To understand this, one must have a little knowledge about python lists, strings, and some modular in-built functions in python (this may change upon the context of my learning and my ability to make the code more efficient).

This repository will be updated every one or two weeks.

Till date (15/11/2020), most of the techniques I've learnt over till now, consists of losless compression techniques and most of them are used to encode strings. The same can be used for text files, with minor modification requirements. All the files consists of the decoding part as well. The techniques are:

  1. Huffman Coding
  2. Run Length Encoding
    2.1. For alphabet runs
    2.2. For binary runs
  3. Golomb Coding
  4. Tunstall Coding
  5. Arithmetic Coding
  6. Dictionary Techniques
    6.1. LZ77
    6.2. LZ78
    6.3. LZW

If you like the codes and their explanation, make sure to leave a star on my repository.😁

data-compression's People

Contributors

ritwik00025 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

data-compression's Issues

huffman_encode_decode.py

There exists some error in the code. For example, for probability list [0.15850000083446503, 0.15620000660419464, 0.15389999747276306, 0.12359999865293503, 0.11129999905824661, 0.10100000351667404, 0.0982000008225441, 0.09719999879598618], the program generates:

Alphabet Codeword
0.09719999879598618 0101110
0.0982000008225441 0101111
0.10100000351667404 011110
0.11129999905824661 011111
0.12359999865293503 10110
0.15389999747276306 10111
0.15620000660419464 1110
0.15850000083446503 1111

while actually, the constructed huffman tree is a full binary tree, and the above codeword should be: 000,001,010,011,100,101,110,111

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.