3.1.9.1.2 Detailed Description
This section describes a method to accept a compressed stream of data of a given length and to output the decompressed bytes and a byte count.
Any compressor can encounter input data that cannot be reduced further. There are two different paths that allow input data to be passed "raw" or with minimal encoding overhead. All output bytes MUST be recorded in the history buffer, even bytes from unencoded segments or runs, because a match operation could subsequently appear and reference these bytes.
RDP 8.0 compressor limits:
Maximum number of uncompressed bytes in a single segment: 65,535.
Maximum match distance / minimum history size: 2,500,000 bytes.
Maximum number of segments: 65,535.
Maximum expansion of a segment (when compressed size exceeds uncompressed): 1,000 bytes.
Minimum match length: 3 bytes.
The compression type code to identify RDP 8.0 compressed data is PACKET_COMPR_TYPE_RDP8 (0x04).