Next: , Previous: Encryption algorithms used in the record layer, Up: The TLS record protocol


3.3.2 Compression algorithms used in the record layer

The TLS record layer also supports compression. The algorithms implemented in GnuTLS can be found in the table below. All the algorithms except for DEFLATE which is referenced in [RFC3749] (See RFC3749.) , should be considered as GnuTLS' extensions1, and should be advertised only when the peer is known to have a compliant client, to avoid interoperability problems.

The included algorithms perform really good when text, or other compressible data are to be transfered, but offer nothing on already compressed data, such as compressed images, zipped archives etc. These compression algorithms, may be useful in high bandwidth TLS tunnels, and in cases where network usage has to be minimized. As a drawback, compression increases latency.

The record layer compression in GnuTLS is implemented based on the proposal [RFC3749] (See RFC3749.) . The supported compression algorithms are:

DEFLATE
Zlib compression, using the deflate algorithm.
LZO
LZO is a very fast compression algorithm. This algorithm is only available if the GnuTLS-extra library has been initialized and the private extensions are enabled.

Footnotes

[1] You should use gnutls_handshake_set_private_extensions to enable private extensions.