Coder Social home page Coder Social logo

etshawy1 / bzip2-modified-compression Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.7 MB

A file compression tool that implements BWT, MTF, LZW algorithms

License: MIT License

Makefile 2.11% C++ 97.89%
cpp bwt mtf lzw compression enwik8 suffix-array suffix-tree

bzip2-modified-compression's Introduction

Bzip2 modified algorithm

A file compression tool that implements BWT, MTF, LZW algorithms.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

you need to have g++ compiler and make installed on your machine.

Building the code

enter the following commands

make

Usage

Encoding Usage: {Algorithm} -e infile outfile
Decoding Usage: {Algorithm} -d infile outfile

where Algorithms supported are {bwt, mft, lzw, combo}
combo does (bwt then mft then lzw) for encoding and reverse order for decoding

Example

./bin/main combo -e enwik8 encoded.bin

./bin/main combo -d encoded.bin decoded.txt

License

Licensed under the MIT License.

Acknowledgments

I used the help of this research paper:

Kärkkäinen, Juha & Sanders, Peter & Burkhardt, Stefan. (2006). Linear work suffix array construction. J. ACM. 53. 918-936. 10.1145/1217856.1217858.

to implement the suffix array for BWT in O(n) instead of other easier solutions like O(nlogn) as the algorithm is used for files around hudreds of megabytes which would take much time.

bzip2-modified-compression's People

Contributors

etshawy1 avatar

Stargazers

 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.