0 branches
Tree
Top files
Clone with HTTPS:
Description
compress.lz provides pure V implementations of several LZ-family codecs.
Supported formats:
lz77lz78lzwlz4lzsslzmalzma2lzjbUse the generic API when selecting a format dynamically:
Use the format-specific APIs for direct calls:import compress.lz encoded := lz.compress('hello hello hello'.bytes(), .lz77)! decoded := lz.decompress(encoded, .lz77)! assert decoded.bytestr() == 'hello hello hello'import compress.lz encoded := lz.compress_lzw('banana banana'.bytes())! decoded := lz.decompress_lzw(encoded)! assert decoded.bytestr() == 'banana banana'