std.flate
deflate both ways (rfc 1951), gzip (rfc 1952), zlib (rfc 1950)
FlateError
Section titled “FlateError”pub FlateError :: errors { truncated, bad_block, bad_code, bad_distance, bad_header, bad_checksum,}truncated: the data ends before the stream doesbad_block: block type 3, or stored length check failsbad_code: bad code lengths, or a code not in the tablebad_distance: back-ref before the start of the outputbad_header: not gzip/zlib, or a zlib preset dictionarybad_checksum: crc-32, adler-32 or length mismatch
inflate
Section titled “inflate”pub inflate :: fn(a: *Arena, data: []const u8) -> []u8 ! FlateErrorraw deflate (rfc 1951), result in a; bytes after the stream ignored
gunzip
Section titled “gunzip”pub gunzip :: fn(a: *Arena, data: []const u8) -> []u8 ! FlateErrorgzip content in a; checks crc-32 and length; first member only
unzlib
Section titled “unzlib”pub unzlib :: fn(a: *Arena, data: []const u8) -> []u8 ! FlateErrorzlib (rfc 1950) content in a; checks adler-32; preset dictionary -> .bad_header
deflate
Section titled “deflate”pub deflate :: fn(a: *Arena, data: []const u8, level: u32) -> []u8raw deflate (rfc 1951) in a; level 0 stores, 1 fastest, 9 smallest, 6 balanced
pub gzip :: fn(a: *Arena, data: []const u8, level: u32) -> []u8gzip in a: header without name/time, deflate at level, crc-32, length
pub zlib :: fn(a: *Arena, data: []const u8, level: u32) -> []u8zlib (rfc 1950) in a: 2-byte header, deflate at level, adler-32