3.1.4.1.1 Extended Buffer Handling
The EcDoConnectEx method contains request and response buffers that use an extended buffer mechanism where the payload is preceded by a header. The header contains the flags specified in section 2.2.2.1 that determine whether the payload has been compressed, determine whether the payload has been obfuscated, and determine whether another extended buffer and payload exist after the current payload. A single payload MUST NOT exceed 32 KB in size.
An extended buffer is used in the rgbAuxIn and rgbAuxOut parameters on the EcDoConnectEx method as specified in section 3.1.4.1.1.1.1 and section 3.1.4.1.1.1.2.
The client or server can choose not to compress the payload if the payload is small enough that compression would not yield much benefit. The client or server can choose not to obfuscate the payload if the payload has already been compressed. The client or server can choose not to obfuscate the payload if the client is connected using RPC layer encryption.
The extended buffer format, compression algorithm, obfuscation algorithm, and extended buffer packing for the EcDoConnectEx method are specified in section 3.1.4.1.1.1 through section 3.1.4.1.3 and their subsections.