streaming-png-0.1.0.0: Perfectly streaming PNG image decoding

Copyright(c) Bradley Hardy 2016
LicenseLGPL3
Maintainerbradleyhardy@live.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Streaming.Zlib

Contents

Description

 

Synopsis

Decompressing and compressing streams

decompressStream :: (MonadIO m, MonadThrow m) => ByteString m r -> ByteString m r Source

Use Zlib to decompress a ByteString with the default parameters.

decompressStream' :: (MonadIO m, MonadThrow m) => WindowBits -> ByteString m r -> ByteString m r Source

Use Zlib to decompress a ByteString with the specified WindowBits.

compressStream :: (MonadIO m, MonadThrow m) => ByteString m r -> ByteString m r Source

Use Zlib to compress a ByteString with the default parameters.

compressStream' :: (MonadIO m, MonadThrow m) => CompressionLevel -> WindowBits -> ByteString m r -> ByteString m r Source

Use Zlib to compress a ByteString with the specified CompressionLevel and WindowBits.

Re-exported from Zlib

type CompressionLevel = Int Source

An integer between 0 and 9.

data WindowBits :: *

This specifies the size of the compression window. Larger values of this parameter result in better compression at the expense of higher memory usage.

The compression window size is the value of the the window bits raised to the power 2. The window bits must be in the range 8..15 which corresponds to compression window sizes of 256b to 32Kb. The default is 15 which is also the maximum size.

The total amount of memory used depends on the window bits and the MemoryLevel. See the MemoryLevel for the details.

Instances

Eq WindowBits 
Ord WindowBits 
Show WindowBits 
Generic WindowBits 
type Rep WindowBits = D1 D1WindowBits ((:+:) (C1 C1_0WindowBits (S1 NoSelector (Rec0 Int))) (C1 C1_1WindowBits U1)) 

defaultWindowBits :: WindowBits

The default WindowBits is 15 which is also the maximum size.

defaultCompressionLevel :: CompressionLevel Source

The default compression level is 6.