#ifndef _NTIOAPI_H
/**
* The FILE_COMPRESSION_INFORMATION structure describes the state of a compressed data buffer.
* \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_file_compression_information
*/
typedef struct _FILE_COMPRESSION_INFORMATION
{
LARGE_INTEGER CompressedFileSize;
USHORT CompressionFormat;
UCHAR CompressionUnitShift;
UCHAR ChunkShift;
UCHAR ClusterShift;
UCHAR Reserved[3];
} FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
View code on GitHub// ntifs.h
typedef struct _FILE_COMPRESSION_INFORMATION {
LARGE_INTEGER CompressedFileSize;
USHORT CompressionFormat;
UCHAR CompressionUnitShift;
UCHAR ChunkShift;
UCHAR ClusterShift;
UCHAR Reserved[3];
} FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
View the official Windows Driver Kit DDI referenceThis structure is documented in Windows Driver Kit.
The FILE_COMPRESSION_INFORMATION structure describes the state of a compressed data buffer.
CompressedFileSizeThe size, in bytes, of the compressed file.
CompressionFormatThe compression format. This member must have one of the following values:
| Value | Meaning |
|---|---|
| COMPRESSION_FORMAT_NONE | No compression format. |
| COMPRESSION_FORMAT_DEFAULT | Default compression format. |
| COMPRESSION_FORMAT_LZNT1 | LZNT1 compression format. |
CompressionUnitShiftThe log, base 2, of the number of clusters per compression
unit. In the NTFS file system, this value is NTFS_CLUSTERS_PER_COMPRESSION.
ChunkShiftThe log, base 2, of the number of bytes in a chunk. In other words, the size in bytes of the chunk is 2 ** ChunkShift, or (1 << ChunkShift).
ClusterShiftThe log, base 2, of the minimum number of clusters by which compression must reduce the size of the compression unit. If compression does not reduce the size of the compression unit by at least 2 ** ClusterShift clusters (or 1 << ClusterShift clusters), compression will not occur. Each compression unit must occupy at least one cluster less than the uncompressed data would occupy.
ReservedReserved
FLT_PARAMETERS for IRP_MJ_QUERY_INFORMATION