Deflate module

inflate

procedure · 1 overloadsince 0.28.0Source

Decompresses data into a new buffer. max_output bounds the result (a compressed bomb fails instead of exhausting memory). A GZIP stream is a single member; bytes after the stream are ignored. On failure the output is empty and error says why.

inflate :: (
    data: [] u8,
    container := Deflate_Container.ZLIB,
    max_output: s64 = DEFAULT_MAX_OUTPUT
) -> (output: [] u8, ok: bool, error: string)

Decompresses data into a new buffer. max_output bounds the result (a compressed bomb fails instead of exhausting memory). A GZIP stream is a single member; bytes after the stream are ignored. On failure the output is empty and error says why.

Parameters

data: [] u8
container := Deflate_Container.ZLIB
max_output: s64

Returns

output: [] u8
ok: bool
error: string

See also