ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Archive.Inflate

Description

A scoped inflater over the existing streaming-commons ABI, with deterministic release on every exit.

Synopsis

Documentation

data InflateFormat Source #

Raw deflate, one zlib stream, or a bounded sequence of gzip members.

withInflatedChunks :: InflateFormat -> (Int -> IO ()) -> ByteString -> (IO (Either ParseError ByteString) -> IO a) -> IO a Source #

Use the pull action sequentially inside its callback. Empty output denotes the verified stream end.

inflateBounded :: InflateFormat -> Text -> Int -> (Int -> IO ()) -> ByteString -> IO (Either ParseError ByteString) Source #

Collect one payload of at most bound inflated bytes, paying 73728 + 3 * held before keeping each chunk.