Idris2Doc : Codec.Compression.Zlib.Decompress

Codec.Compression.Zlib.Decompress

(source)

Definitions

decompressWith : Wrapper -> IBuffer n -> IO (Either (List ZlibError) AnyBuffer)
  Decompress an immutable byte buffer using the requested wrapper format.

Decompression is performed incrementally because the final uncompressed
size cannot generally be determined before decoding.

Each iteration allocates a fixed-size output buffer, calls `inflate`, and
retains only the prefix actually produced by zlib. Input consumption is
tracked using the `consumed` count returned by `inflateBuffer`, allowing
subsequent calls to continue from the correct offset without copying or
slicing the compressed input.

Output chunks are accumulated until zlib returns `Z_STREAM_END`, after
which they are concatenated into a single `AnyBuffer`.

Input and output buffers cross the Chez/C boundary without intermediate
copies. The C shim borrows their underlying bytevectors only for the
duration of each `inflate` call.

Totality: total
Visibility: export
decompress : IBuffer n -> IO (Either (List ZlibError) AnyBuffer)
  Decompress an immutable byte buffer containing a standard zlib stream.

Totality: total
Visibility: export
gzipDecompress : IBuffer n -> IO (Either (List ZlibError) AnyBuffer)
  Decompress an immutable byte buffer containing a gzip stream.

Totality: total
Visibility: export
rawDecompress : IBuffer n -> IO (Either (List ZlibError) AnyBuffer)
  Decompress an immutable byte buffer containing a raw DEFLATE stream with
no zlib or gzip wrapper.

Totality: total
Visibility: export