MyNixOS website logo
Description

Streamly combinators for LZ4 compression.

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

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.

Metadata

Version

0.1.2

License

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows