D
Language
Phobos
Comparisons
object
std
std.base64
std.boxer
std.compiler
std.conv
std.ctype
std.date
std.file
std.format
std.gc
std.intrinsic
std.math
std.md5
std.mmfile
std.openrj
std.outbuffer
std.path
std.process
std.random
std.recls
std.regexp
std.socket
std.socketstream
std.stdint
std.stdio
std.cstream
std.stream
std.string
std.system
std.thread
std.uri
std.utf
std.zip
std.zlib
std.windows
std.linux
std.c
std.c.stdio
std.c.windows
std.c.linux
|
std.zlib
Compress / decompress data using the
zlib library.
- uint adler32(uint adler, void[] buf)
- Compute the Adler32 checksum of the data in buf[].
adler is the starting value when computing a cumulative
checksum.
- uint crc32(uint crc, void[] buf)
- Compute the CRC32 checksum of the data in buf[].
crc is the starting value when computing a cumulative
checksum.
- class ZlibException
- Thrown in the case of errors occurring in the following:
- void[] compress(void[] buf)
- void[] compress(void[] buf, int level)
- Compresses the data in buf[] 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.
- void[] uncompress(void[] buf)
- void[] uncompress(void[] buf, uint destbufsize)
- Decompresses the data in buf[].
destbufsize is the size of the uncompressed data. It
need not be accurate, but the decompression will be faster if
the exact size is supplied.
Returns the decompressed data.
- class Compress
- Used when the data to be compressed is not all in one buffer.
- this()
- this(int level)
- Construct. level is the same as for D.zlib.compress().
- void[] compress(void[] buf)
- Compress the data in buf and return the compressed data.
The buffers returned from successive calls to this should be
concatenated together.
- void[] flush()
- void[] flush(int mode)
- Compress and return any remaining data.
The returned data should be appended to that returned by compress().
mode is one of the following:
- Z_SYNC_FLUSH
- Syncs up flushing to the next byte boundary.
Used when more data is to be compressed later on.
- Z_FULL_FLUSH
- Syncs up flushing to the next byte boundary.
Used when more data is to be compressed later on,
and the decompressor needs to be restartable at this point.
- Z_FINISH (default)
- Used when finished compressing the data.
- class UnCompress
- Used when the data to be decompressed is not all in one buffer.
- this()
- this(uint destbufsize)
- Construct. destbufsize is the same as for D.zlib.uncompress().
- void[] uncompress(void[] buf)
- Decompress the data in buf and return the decompressed data.
The buffers returned from successive calls to this should be
concatenated together.
- void[] flush()
- Decompress and return any remaining data.
The returned data should be appended to that returned by uncompress().
The UnCompress object cannot be used further.
|