lz4-hs-0.1.5.3: lz4 bindings for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Codec.Lz4

Description

The functions in this module throw exceptions on error.

decompress and compress are fully lazy, i.e. memory efficient.

Synopsis

Functions for working with blocks

decompressBlockSz Source #

Arguments

:: ByteString 
-> Int

Decompressed size

-> ByteString 

Decompress a block. The size of the uncompressed data must be known.

decompressBlockSzSingleThreaded Source #

Arguments

:: ByteString 
-> Int

Decompressed size

-> ByteString 

Decompress a block. Like decompressBlockSz but uses unsafeDupablePerformIO under the hood.

Since: 0.1.5.0

lZ4MaxInputSize :: Integral a => a Source #

Since: 0.1.1.0

compressBlockHC Source #

Arguments

:: Int

Compression level (must be less than lZ4HCClevelMax)

-> ByteString 
-> ByteString 

Since: 0.1.1.0

compressBlockHCSingleThreaded Source #

Arguments

:: Int

Compression level (must be less than lZ4HCClevelMax)

-> ByteString 
-> ByteString 

Like compressBlockHC except uses unsafeDupablePerformIO under the hood.

Since: 0.1.5.0

lZ4HCClevelMax :: Integral a => a Source #

Since: 0.1.1.0

Functions for working with frames

compress :: ByteString -> ByteString Source #

Lazily compress a frame.

compressSz Source #

Arguments

:: Int

Compression level

-> ByteString 
-> ByteString 

Since: 0.1.4.0

decompress :: ByteString -> ByteString Source #

Lazily decompress a frame

decompressBufSz Source #

Arguments

:: Int

Size of the output buffer

-> ByteString 
-> ByteString 

Since: 0.1.3.0

Version info

lZ4VersionNumber :: CInt Source #

Since: 0.1.1.0