{-# LANGUAGE RankNTypes #-}
module Pipes.GZip (
decompress
, decompress'
, compress
, Pipes.Zlib.CompressionLevel
, Pipes.Zlib.defaultCompression
, Pipes.Zlib.noCompression
, Pipes.Zlib.bestSpeed
, Pipes.Zlib.bestCompression
, Pipes.Zlib.compressionLevel
) where
import qualified Data.Streaming.Zlib as Zlib
import qualified Data.ByteString as B
import Pipes
import qualified Pipes.Zlib
decompress
:: MonadIO m
=> Proxy x' x () B.ByteString m r
-> Proxy x' x () B.ByteString m r
decompress :: Proxy x' x () ByteString m r -> Proxy x' x () ByteString m r
decompress = WindowBits
-> Proxy x' x () ByteString m r -> Proxy x' x () ByteString m r
forall (m :: * -> *) x' x r.
MonadIO m =>
WindowBits
-> Proxy x' x () ByteString m r -> Proxy x' x () ByteString m r
Pipes.Zlib.decompress WindowBits
gzWindowBits
{-# INLINABLE decompress #-}
decompress'
:: MonadIO m
=> Producer B.ByteString m r
-> Producer B.ByteString m (Either (Producer B.ByteString m r) r)
decompress' :: Producer ByteString m r
-> Producer ByteString m (Either (Producer ByteString m r) r)
decompress' = WindowBits
-> Producer ByteString m r
-> Producer ByteString m (Either (Producer ByteString m r) r)
forall (m :: * -> *) r.
MonadIO m =>
WindowBits
-> Producer ByteString m r
-> Producer ByteString m (Either (Producer ByteString m r) r)
Pipes.Zlib.decompress' WindowBits
gzWindowBits
{-# INLINABLE decompress' #-}
compress
:: MonadIO m
=> Pipes.Zlib.CompressionLevel
-> Proxy x' x () B.ByteString m r
-> Proxy x' x () B.ByteString m r
compress :: CompressionLevel
-> Proxy x' x () ByteString m r -> Proxy x' x () ByteString m r
compress clevel :: CompressionLevel
clevel = CompressionLevel
-> WindowBits
-> Proxy x' x () ByteString m r
-> Proxy x' x () ByteString m r
forall (m :: * -> *) x' x r.
MonadIO m =>
CompressionLevel
-> WindowBits
-> Proxy x' x () ByteString m r
-> Proxy x' x () ByteString m r
Pipes.Zlib.compress CompressionLevel
clevel WindowBits
gzWindowBits
{-# INLINABLE compress #-}
gzWindowBits :: Zlib.WindowBits
gzWindowBits :: WindowBits
gzWindowBits = Int -> WindowBits
Zlib.WindowBits 31