This library implements Haskell bindings to LZ4, a fast
compression library. It links against the system liblz4 (including
lz4frame), so builds require the LZ4 headers and library to be
installed (for example liblz4-dev on Debian/Ubuntu, or lz4 via
Homebrew).
Codec.Compression.LZ4.compress/decompresskeep the historical length-prefixed format used by this package.Codec.Compression.LZ4.compressFrame/decompressFrameprovide a separate framed API for compatibility with standardlz4frame files.compressFrameEither/decompressFrameEitherprovide the stable typed framed error contract for encode/decode, whilecompressFrame/decompressFrameremain backward-compatibleMaybewrappers.decompressFrameBounded/decompressFrameBoundedFromprovide a bounded framed decode path that yields partial output with an explicit continuation offset when a caller-supplied output limit is reached.- Legacy and framed formats are intentionally separate: legacy payloads
are decoded only by
decompress, while framed payloads are decoded only bydecompressFrame. - The framed API uses native
LZ4Fbindings and does not shell out to thelz4executable at runtime.
GitHub Actions CI runs:
cabal test propertiescabal test oracle(requires thelz4CLI inPATH)cabal build --enable-benchmarks lz4:bench:bench1
It's just a cabal install away on Hackage:
$ cabal install lz4File bugs in the GitHub issue tracker.
Master git repository:
git clone https://github.com/mwotton/lz4hs.git
See AUTHORS.txt.
BSD3. See LICENSE.txt for terms of copyright and redistribution.