RDP uses a modified form of the Microsoft Point-to-Point Compression (MPPC) protocol to perform bulk compression of the PDU contents. This protocol is described in [RFC2118]. There are two forms of compression used at the server and client:
-
MPPC-8K: The original MPPC protocol, with an 8-kilobyte history buffer (section 3.1.8.4.1).
-
MPPC-64K: A modified version of MPPC which uses a 64-kilobyte history buffer and implements rearranged Huffman style encoding for the bitstream formats (section 3.1.8.4.2).
Both the server and client may operate as the sender of compressed data. Server-to-client compression can be used for Fast-Path output data (see section 2.2.9.1.2.1), Slow-Path output data (see section 2.2.9.1.1) or virtual channel data (see section 2.2.6.1). Client-to-server compression can currently only be used for virtual channel data.
The client advertises the maximum compression type it supports in the Client Info PDU (see section 2.2.1.11). In response the server selects a compression type within the range advertised by the client. This compression type is then used when performing all subsequent server-to-client and client-to-server bulk compression.
The compression type usage is indicated on a per-PDU basis by compression flags which are set in the header flags associated with each PDU. Besides being used to indicate the compression type, the compression flags are also used to communicate compression state changes which are required to maintain state synchronization. The header used to transmit the compression flags will depend on the type of data payload, such as Fast-Path output data (see section 2.2.9.1.2.1), virtual channel data (section 2.2.6.1) or Slow-Path data (section 2.2.9.1.1).