zstd-0.1.3.0: Haskell bindings to the Zstandard compression algorithm

Copyright | (c) 2016-present Facebook Inc. All rights reserved.
License | BSD3
Maintainer | bryano@fb.com
Stability | experimental
Portability | GHC
Safe Haskell | None
Language | Haskell2010

Codec.Compression.Zstd.Lazy

Description

Lazy compression and decompression support for zstd. Under the hood, these are implemented using the streaming APIs.

Synopsis

- compress :: Int -> ByteString -> ByteString
- decompress :: ByteString -> ByteString
- maxCLevel :: Int

# Documentation

compress Source #

Arguments

:: Int | Compression level. Must be >= 1 and <= `maxCLevel`.
-> ByteString | Payload to compress. This will be consumed lazily.
-> ByteString |

Compress a payload. The input will be consumed lazily, and the compressed result generated lazily.

Note: if any error occurs, compression will fail part-way through with a call to `error`.

decompress :: ByteString -> ByteString Source #

Decompress a payload. The input will be consumed lazily, and the decompressed result generated lazily.

Note: if any error occurs, decompression will fail part-way through with a call to `error`.

maxCLevel :: Int Source #

The maximum compression level supported by the library.