| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Archive.Inflate
Description
A scoped inflater over the existing streaming-commons ABI, with deterministic release on every exit.
Synopsis
- data InflateFormat
- withInflatedChunks :: InflateFormat -> (Int -> IO ()) -> ByteString -> (IO (Either ParseError ByteString) -> IO a) -> IO a
- inflateBounded :: InflateFormat -> Text -> Int -> (Int -> IO ()) -> ByteString -> IO (Either ParseError ByteString)
Documentation
data InflateFormat Source #
Raw deflate, one zlib stream, or a bounded sequence of gzip members.
Constructors
| RawDeflate | |
| ZlibStream | |
| GzipMembers Int |
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.