Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dominikkempa/lazy-lz77

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lazy LZ77 Factorization (C++ Implementation)

Description

This project provides a C++ implementation of the KKP2 linear-time algorithm for computing the LZ77 factorization, as presented in [1]. LZ77 factorization is a foundational method in data compression, widely used in formats such as gzip and PNG.


Requirements

  • C++ compiler with C++11 support or newer (e.g., g++ >= 4.8.1, clang++ >= 3.3)
  • GNU Make
  • No additional libraries required

Compilation

To build the main program, run:

$ make

This produces the executable compute_lz77, which constructs the LZ77 factorization of a given file.


Usage

$ ./compute_lz77 input.txt

This reads the text in input.txt, computes its LZ77 factorization, and writes the result to input.txt.lz77.

You can specify an alternative output file using:

$ ./compute_lz77 input.txt -o output.lz77

Correctness Tests

To perform correctness tests of the implementation:

$ cd tests
$ make
$ ./test

This runs built-in tests to verify the correctness of the LZ77 factorization.


References

[1] Juha Kärkkäinen, Dominik Kempa, Simon J. Puglisi: Lazy Lempel-Ziv Factorization Algorithms.
ACM Journal of Experimental Algorithmics 21(1): 2.4:1–2.4:19 (2016)

About

Lazy LZ77 factorization algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published