pipes-brotli-0.0.0.0: Brotli (RFC7932) compressors and decompressors for the Pipes package

Copyright© 2016 Herbert Valerio Riedel
Maintainerhvr@gnu.org
Safe HaskellTrustworthy
LanguageHaskell2010

Pipes.Brotli

Contents

Description

Compression and decompression of data streams in the "Brotli" format (RFC7932)

Synopsis

Simple interface

compress :: forall m r. MonadIO m => Producer ByteString m r -> Producer ByteString m r Source #

Compress a ByteString.

Extended interface

Compression

compressWith :: forall m r. MonadIO m => CompressParams -> Producer ByteString m r -> Producer ByteString m r Source #

Compress a ByteString with a given set of CompressParams.

defaultCompressParams :: CompressParams #

The default set of parameters for compression. This is typically used with the compressWith function with specific parameters overridden.

data CompressParams #

Set of parameters for compression. The defaults are defaultCompressParams.

compressSizeHint :: CompressParams -> Word32 #

CompressParams field: Estimated total input size. The default value is 0, which means that the total input size is unknown.

data CompressionLevel #

Compression quality setting

Instances
Bounded CompressionLevel 
Instance details

Defined in LibBrotli

Enum CompressionLevel 
Instance details

Defined in LibBrotli

Eq CompressionLevel 
Instance details

Defined in LibBrotli

Ord CompressionLevel 
Instance details

Defined in LibBrotli

Read CompressionLevel 
Instance details

Defined in LibBrotli

Show CompressionLevel 
Instance details

Defined in LibBrotli

data CompressionWindowSize #

Recommended sliding LZ77 window size.

The encoder may reduce this value (if e.g. input is much smaller than window size).

Instances
Bounded CompressionWindowSize 
Instance details

Defined in LibBrotli

Enum CompressionWindowSize

This Enum instance is offset by 10.

>>> toEnum CompressionWindowBits10
10
>>> fromEnum 22 :: CompressionWindowSize
CompressionWindowBits22
Instance details

Defined in LibBrotli

Eq CompressionWindowSize 
Instance details

Defined in LibBrotli

Ord CompressionWindowSize 
Instance details

Defined in LibBrotli

Read CompressionWindowSize 
Instance details

Defined in LibBrotli

Show CompressionWindowSize 
Instance details

Defined in LibBrotli

data CompressionMode #

Encoding profile

Constructors

CompressionModeGeneric

Format-agnostic default mode

CompressionModeText

UTF-8 formatted text data

CompressionModeFont

Compression mode used in WOFF 2.0

Decompression

decompressWith :: forall m r. MonadIO m => DecompressParams -> Producer ByteString m r -> Producer ByteString m (Producer ByteString m r) Source #

Decompress a ByteString with a given set of DecompressParams.

defaultDecompressParams :: DecompressParams #

The default set of parameters for decompression. This is typically used with the decompressWith function with specific parameters overridden.

data DecompressParams #

Set of parameters for decompression. The defaults are defaultDecompressParams.

decompressDisableRingBufferReallocation :: DecompressParams -> Bool #

DecompressParams field: If True, ring buffer is allocated according to window size, despite the real size of the content. (default: False)