Partager via


2.3.18 FSCTL_GET_COMPRESSION Reply

The FSCTL_GET_COMPRESSION reply message returns the results of the FSCTL_GET_COMPRESSION request as a 16-bit unsigned integer value that indicates the current compression state of the file or directory.

The CompressionState element 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

CompressionState

CompressionState (2 bytes): One of the following standard values MUST be returned.

Value

Meaning

COMPRESSION_FORMAT_NONE

0x0000

The file or directory is not compressed.

COMPRESSION_FORMAT_LZNT1

0x0002

The file or directory is compressed by using the LZNT1 compression algorithm. For more information, see [UASDC].

All other values

Reserved for future use and MUST NOT be used.

The actual file or directory compression format is implementation-dependent.<26>

If the file system of the volume that contains the specified file or directory does not support per-file or per-directory compression, the request MUST NOT succeed. The error code that is returned in this situation MUST be as specified in section 2.2.

This message also returns a status code as specified in section 2.2. Upon success, the status code returned by the function that processes this FSCTL is STATUS_SUCCESS. The most common error codes are listed in the following table.

 Error code

 Meaning

STATUS_INVALID_PARAMETER

0xC000000D

The output buffer length is less than 2, or the handle is not to a file or directory.

STATUS_INVALID_DEVICE_REQUEST

0xC0000010

The volume does not support compression.<27>