mirror of
https://github.com/Anuken/nimlzf
synced 2026-01-02 03:14:46 +00:00
No description
| src | ||
| .gitignore | ||
| LICENSE | ||
| nimlzf.nimble | ||
| README.md | ||
nimlzf
A simple wrapper for the liblzf compression library.
API:
#low-level pointer-based procs:
proc lzfCompress*(inData: pointer, inLen: int, outData: pointer, outLen: int): int
proc lzfDecompress*(inData: pointer, inLen: int, outData: pointer, outLen: int): int
#higher-level string-based procs:
proc lzfCompress[T: byte | char](data: openArray[T]): string
proc lzfDecompress[T: byte | char](data: openArray[T], decompressedLen: int): string
Note that lzfCompress will fail (throw an IOError) if the data is too short and/or cannot be compressed below its original size.