streamly-lz4: Streamly combinators for LZ4 compression

[ apache, codec, compression, library, streamly ] [ Propose Tags ] [ Report a vulnerability ]

Compress and decompress streams of data using LZ4 compression. See https://github.com/lz4/lz4 .


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
fusion-plugin

Use fusion plugin for benchmarks and executables

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0, 0.1.1, 0.1.2
Change log CHANGELOG.md
Dependencies base (>=4 && <5), exceptions (>=0.8 && <0.11), fusion-plugin-types (>=0.1 && <0.2), streamly (>=0.8.2 && <0.8.3) [details]
Tested with ghc ==8.2.2, ghc ==8.4.4, ghc ==8.6.5, ghc ==8.8.4, ghc ==8.10.7, ghc ==9.0.1, ghc ==9.2.1
License Apache-2.0
Copyright 2020 Composewell Technologies
Author Composewell Technologies
Maintainer streamly@composewell.com
Category Codec, Compression, Streamly
Home page https://github.com/composewell/streamly-lz4
Bug tracker https://github.com/composewell/streamly-lz4/issues
Source repo head: git clone https://github.com/composewell/streamly-lz4
Uploaded by adithyaov at 2022-03-07T12:00:02Z
Distributions
Downloads 320 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-03-07 [all 1 reports]

Readme for streamly-lz4-0.1.2

[back to package description]

streamly-lz4

This library uses the LZ4 compression algorithm https://github.com/lz4/lz4 to compress and decompress a data stream using Haskell Streamly.

Running benchmarks

download-corpora.sh downloads and unpacks the caterbury corpus used for benchmarking.

Run the following commands from the top level directory in the repo:

$ ./download-corpora.sh
$ cabal run bench-lz4 -- --quick

To use fusion-plugin for benchmarks:

$ cabal run --flag fusion-plugin bench-lz4 -- --quick

Benchmarking an external corpus

BENCH_STREAMLY_LZ4_FILE is looked up for file to benchmark. This should contain the absolute path of the target file.

BENCH_STREAMLY_LZ4_STRATEGY is looked up for which benchmarking combinator to run on the target file.

It can contain values of the following structure,

  • c+speed+bufsize
  • d+bufsize
  • r+bufsize

c corresponds to compress, d for decompress and r for resizing.

Example,

$ export BENCH_STREAMLY_LZ4_FILE="path/to/file/"
$ export BENCH_STREAMLY_LZ4_STRATEGY="c+400+640000"
$ cabal bench

The commands above runs the compression bench suite on path/to/file/ with the acceleration value of 500 read as arrays of size 640000 bytes.

Note: For the decompression and resizing bench suite a compressed file is expected as input.