GithubHelp home page GithubHelp logo

sahil-4555 / lz77_compression_decompression Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 3 KB

LZ77 algorithm, providing efficient lossless data compression and decompression capabilities. It offers a reliable and flexible solution for reducing file sizes in various programming languages.

C++ 100.00%
algorithms c compression-algorithm cpp data data-compression data-compressor deflate deflate-compare-lz77 deflate-compression lz77-compression-algorithm lzz text-compression

lz77_compression_decompression's Introduction

LZ77 Compression and Decompression

This repository contains an implementation of the LZ77 algorithm, a lossless data compression method. The program provides efficient compression and decompression algorithms for reducing the size of data files.

Features

  • Compression: The program takes an input string and compresses it using the LZ77 algorithm. It generates a sequence of tokens representing the offset, length of the match, and code word for each compressed segment.
  • Decompression: The program can also decompress a sequence of tokens generated by the compression algorithm, reconstructing the original input string.

Functionality

  • Adjustable Parameters: The program allows you to adjust the window size, search buffer size, and look-ahead buffer size in the code. Modify the window_size, search_buffer, and look_ahead_buffer variables in the code to customize these parameters based on your requirements.
  • Compression Output: The compressed output is displayed as a sequence of tokens in the format <offset, length of match, codeword>. Each token represents a compressed segment of the input string.
  • Decompression Output: The program can decompress the sequence of tokens generated during compression and reconstruct the original input string.
  • User Input: The program prompts the user to enter an input string for compression and decompression.

Compression

lz77_CPP_Compression

Decompression

lz77_CPP_Decompression

Usage

  1. Clone the repository:
https://github.com/Sahil-4555/lZ77_Compression_Decompression.git
  1. Compile the source code:
g++ lz77.cpp -o lz77
  1. Run the program:
./lz77

lz77_compression_decompression's People

Contributors

sahil-4555 avatar

Stargazers

 avatar  avatar  avatar  avatar  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.