Skip to content
CShift0.32

Zlib

Struct · namespace System.Compression · Since 0.28

struct Zlib

Deflate data in the zlib container (RFC 1950): a 2-byte header, the data and the Adler-32 checksum. PNG images keep their pixels like this.

Name Description
Compress data compressed with level 6.
Decompress The bytes of the zlib data data; the checksum is checked.
static uint8[] Compress(ReadOnlySlice<uint8> data)

data compressed with level 6.

static uint8[] Compress(ReadOnlySlice<uint8> data, int level)

data compressed with level (0 to 9, see Deflate.Compress).

Panics when level is not 0 to 9.

static CompressionError<uint8[]> Decompress(ReadOnlySlice<uint8> data)

The bytes of the zlib data data; the checksum is checked. Bytes after the checksum are ignored.

Errors