0 branches
Tree Top files
Code
Clone with HTTPS:
56 years ago
..
lz.v lz: add lzma2 variation (#27145) last May 12 1.27 KB
lzma2.v lz: add lzma2 variation (#27145) last May 12 465 bytes

Description

compress.lz provides pure V implementations of several LZ-family codecs.

Supported formats:

Use the generic API when selecting a format dynamically:

import compress.lz

encoded := lz.compress('hello hello hello'.bytes(), .lz77)!
decoded := lz.decompress(encoded, .lz77)!
assert decoded.bytestr() == 'hello hello hello'

Use the format-specific APIs for direct calls:

import compress.lz

encoded := lz.compress_lzw('banana banana'.bytes())!
decoded := lz.decompress_lzw(encoded)!
assert decoded.bytestr() == 'banana banana'