Copyright | (c) 2016-present Facebook Inc. All rights reserved. |
---|---|
License | BSD3 |
Maintainer | bryano@fb.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
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
:: Int | Compression level. Must be >= 1 and <= |
-> 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
.