Reference

std/compression/gzip

std/compression/src/gzip.trb

gzipped and gunzipped: gzip members (RFC 1952) around DEFLATE.

fn gzipped

fn gzipped(bytes: Bytes): Bytes

bytes as one gzip member, with nothing in its header that depends on the machine or the moment: no file name, no time, the operating system "unknown". The same bytes give the same member everywhere.

fn gunzipped

fn gunzipped(bytes: Bytes): Result<Bytes, CompressionError>

What every gzip member of bytes holds, one after the other. Each member's checksum and length are checked.

Errors

  • CompressionError where a header is not gzip's, a method is not DEFLATE, the DEFLATE stream is broken, or a checksum or a length does not match what was inflated.