| Copyright | © 2011 MailRank Inc. |
|---|---|
| License | Apache |
| Maintainer | ARJANEN Loïc Jean David <ljd@luigiscorner.mu> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Codec.Compression.Snappy.Lazy
Description
This module provides fast, pure zero-copy compression and decompression of lazy ByteString data using the Snappy format.
Although these functions operate on lazy ByteStrings, they consume the data strictly: they do not produce any output until they have consumed all of the input, and they produce the output in a single large chunk.
If your data is already in the form of a lazy ByteString, it is likely more efficient to use these functions than to convert your data to and from strict ByteStrings, as you can avoid the additional allocation and copying that would entail.
Synopsis
- compress :: ByteString -> ByteString
- decompress :: ByteString -> ByteString
Documentation
compress :: ByteString -> ByteString Source #
Compress data into the Snappy format.
decompress :: ByteString -> ByteString Source #
Decompress data in the Snappy format.
If the input is not compressed or is corrupt, an exception will be thrown.