Skip to content

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.

Notifications You must be signed in to change notification settings

Sahil-4555/lZ77_Compression_Decompression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages