zstd-0.1.3.0: Haskell bindings to the Zstandard compression algorithm

Codec.Compression.Zstd.Streaming

Description

Streaming compression and decompression support for zstd.

Synopsis

# Documentation

data Result Source #

The result of a streaming compression or decompression step.

Constructors

 Produce ByteString (IO Result) A single frame of transformed data, and an action that when executed will yield the next step in the streaming operation. The action is ephemeral; you should discard it as soon as you use it. Consume (ByteString -> IO Result) Provide the function with more input for the streaming operation to continue. This function is ephemeral. You should call it exactly once, and discard it immediately after you call it.To signal the end of a stream of data, supply an empty input. Error String String An error has occurred. If an error occurs, the streaming operation cannot continue. Done ByteString The streaming operation has ended. This payload may be empty. If it is not, it must be written out.A non-empty payload consists of a frame epilogue, possibly preceded by any data left over from the final streaming step.

#### Instances

Instances details
 Source # Instance detailsDefined in Codec.Compression.Zstd.Streaming MethodsshowsPrec :: Int -> Result -> ShowS #showList :: [Result] -> ShowS #

Arguments

 :: Int Compression level. Must be >= 1 and <= maxCLevel. -> IO Result

Begin a streaming compression operation.

The initial result will be either an Error or a Consume.

Begin a streaming decompression operation.

The initial result will be either an Error or a Consume.

The maximum compression level supported by the library.