2.1.4 Compression

When using TCP or HTTP/HTTPS as the transport, the client and server SHOULD choose to compress messages. This is first negotiated when the connection is established.

If compression is being used, the message can be composed of one or more compression data blocks. Each compression data block has a layout as described in the following table.

Field

Description

ORIGINAL_SIZE
(32 bits)

Specifies the original size of the data. This field uses little-endian byte order.

COMPRESSED_SIZE
(32 bits)

Specifies the size of the data after compression. This field uses little-endian byte order.

DATA

Compressed data.

Note that a compression data block can span multiple DIME records or encryption data blocks.