arsd.zlib

Compress/decompress data using the zlib library.

References: Wikipedia

Members

Classes

Compress
class Compress

Used when the data to be compressed is not all in one buffer.

UnCompress
class UnCompress

Used when the data to be decompressed is not all in one buffer.

ZlibException
class ZlibException

Errors throw a ZlibException.

Functions

adler32
uint adler32(uint adler, const(void)[] buf)

Compute the Adler32 checksum of the data in buf[]. adler is the starting value when computing a cumulative checksum.

compress
const(void)[] compress(const(void)[] srcbuf, int level)
const(void)[] compress(const(void)[] buf)

Compresses the data in srcbuf[] using compression level level. The default value for level is 6, legal values are 1..9, with 1 being the least compression and 9 being the most. Returns the compressed data.

crc32
uint crc32(uint crc, const(void)[] buf)

Compute the CRC32 checksum of the data in buf[]. crc is the starting value when computing a cumulative checksum.

uncompress
void[] uncompress(void[] srcbuf, size_t destlen, int winbits)

Decompresses the data in srcbuf[].

Meta

License

<a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.

Suggestion Box / Bug Report