Skip to content
/ yalz Public

Various Lempel-Ziv compression algorithms.

Notifications You must be signed in to change notification settings

p0rtL6/yalz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yet Another Lempel-Ziv

Various Lempel-Ziv compression algorithms.

LZ77

use yalz::lz77;

fn main() {
    // Search buffer size | Lookahead buffer size
    let compressor = lz77::LZ77Compressor::new(6, 6);
    let compressed_blocks = compressor.compress("ababcbababaa");

    // OR

    let compressed_blocks = lz77::compress("ababcbababaa", 6, 6);

    println!("{:?}", compressed_blocks);

    let decompressed_bytes = lz77::decompress(&compressed_blocks);
    println!("{:?}", decompressed_bytes);
}

LZ78

use yalz::lz78;

fn main() {
    let compressed_blocks = lz78::compress("ababcbababaa");
    println!("{:?}", compressed_blocks);

    let decompressed_bytes = lz78::decompress(&compressed_blocks);
    println!("{:?}", decompressed_bytes);
}

LZSS

todo!()

LZW

todo!()

LZMA

todo!()

About

Various Lempel-Ziv compression algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages