lz4-bytes-0.1.1.1: Bindings to LZ4
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lz4.Frame

Contents

Description

Compress a contiguous sequence of bytes into an LZ4 frame containing a single block.

Synopsis

Compression

compressHighlyU Source #

Arguments

:: Int

Compression level (Use 9 if uncertain)

-> Bytes

Bytes to compress

-> ByteArray 

Use HC compression to produce a frame with a single block. All optional fields (checksums, content sizes, and dictionary IDs) are omitted.

Note: Currently, this produces incorrect output when the size of the input to be compressed is greater than 4MiB. The only way to correct this function is to make it not compress large input. This can be done by setting the high bit of the size. This needs to be tested though since it is an uncommon code path.