Contents

COMPRESSION_ZLIB

The zlib compression algorithm, which is recommended for cross-platform compression.

Declaration

var COMPRESSION_ZLIB: compression_algorithm { get }

Discussion

The Compression library implements the zlib encoder at level 5 only. This compression level provides a good balance between compression speed and compression ratio. The zlib decoder supports decoding data compressed with any compression level.

The encoded format is the raw DEFLATE format as described in IETF RFC 1951, the following obtains the equivalent configuration of the encoder:

deflateInit2(zstream,5,Z_DEFLATED,-15,8,Z_DEFAULT_STRATEGY)

See Also

Algorithm Constants