v / vlib / compress / lz / README.md
35 lines · 25 sloc · 636 bytes · 6cafb40142fca520cc21eb213dab2bc08b545e8d
Raw

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'