Giter VIP home page Giter VIP logo

data-compression's Introduction

Data Compression

Brief

This project aims to provide an implementation of various data compression techniques in Python.
The following compression techniques are implemented in this project:

Installation

To use this project, you will need Python 3 installed on your system. You can download Python 3 from the official website: https://www.python.org/downloads/

Once you have Python 3 installed, you can use the algorithms.

Usage

The project is divided into multiple modules, one for each compression technique. You can use these modules to compress and decompress data.

Here is an example of how to use the LZ77 module to compress a string:

from lz77 import lz77_compress, lz77_decompress

text = "ABAABABAABBBBBBBBBBBBA"
window_size = 6
lookahead_buffer_size = 4

compressed_data = lz77_compress(text, window_size, lookahead_buffer_size)
print(compressed_data)
#output : <0, 0, 'A'> , <0, 0, 'B'> , <2, 1, 'A'> , <3, 2, 'B'> , <5, 3, 'B'> , <2, 2, 'B'> , <4, 4, 'B'> , <2, 2, 'A'>

original_text = lz77_decompress(compressed_data)
print(original_text)
#output : ABAABABAABBBBBBBBBBBBA

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Author

๐Ÿ‘ค Michael Maher

Show your support

Please โญ๏ธ this repository if this project helped you!

Buy Me A Coffee

๐Ÿ“ License

Copyright ยฉ 2022 Michael Maher.
This project is MIT licensed.

data-compression's People

Contributors

michael-m-aher 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.