2.2.3.1.3 SMB2_COMPRESSION_CAPABILITIES

The SMB2_COMPRESSION_CAPABILITIES context is specified in an SMB2 NEGOTIATE request by the client to indicate which compression algorithms the client supports. The format of the data in the Data field of this SMB2_NEGOTIATE_CONTEXT is as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

CompressionAlgorithmCount

Padding

Flags

CompressionAlgorithms (variable)

CompressionAlgorithmCount (2 bytes): The number of elements in CompressionAlgorithms array.

Padding (2 bytes): The sender MUST set this to 0, and the receiver MUST ignore it on receipt.

Flags (4 bytes): This field MUST be set to one of the following values:

Value

Meaning

SMB2_COMPRESSION_CAPABILITIES_FLAG_NONE

0x00000000

Chained compression is not supported.

SMB2_COMPRESSION_CAPABILITIES_FLAG_CHAINED

0x00000001

Chained compression is supported on this connection.

CompressionAlgorithms (variable): An array of 16-bit integer IDs specifying the supported compression algorithms. These IDs MUST be in order of preference from most to least. The following IDs are defined.

Value

Meaning

NONE

0x0000

No compression

LZNT1

0x0001

LZNT1 compression algorithm

LZ77

0x0002

LZ77 compression algorithm

LZ77+Huffman

0x0003

LZ77+Huffman compression algorithm

Pattern_V1

0x0004

Pattern Scanning algorithm

LZ4

0x0005

LZ4 compression algorithm