Compartilhar via


2.2.8.3.13 SMB_QUERY_FILE_COMRESSION_INFO

This information level structure is used in TRANS2_QUERY_PATH_INFORMATION (section 2.2.6.6) and TRANS2_QUERY_FILE_INFORMATION (section 2.2.6.8) responses to return the compression information for the file in the request.<181>

 SMB_QUERY_FILE_COMRESSION_INFO 
   {
   LARGE_INTEGER CompressedFileSize;
   USHORT        CompressionFormat;
   UCHAR         CompressionUnitShift;
   UCHAR         ChunkShift;
   UCHAR         ClusterShift;
   UCHAR         Reserved[3];
   }
  

CompressedFileSize: (8 bytes): A 64-bit signed integer that contains the size, in bytes, of the compressed file. This value MUST be greater than or equal to 0x0000000000000000.

CompressionFormat: (2 bytes): A 16-bit unsigned integer that contains the compression format. The actual compression operation associated with each of these compression format values is implementation-dependent. An implementation can associate any local compression algorithm with the values described in the following table, because the compressed data does not travel across the wire in the context of this transaction. The following compression formats are valid only for NTFS.

Name and bitmask

Meaning

COMPRESSION_FORMAT_NONE

0x0000

The file or directory is not compressed.

COMPRESSION_FORMAT_DEFAULT

0x0001

The file or directory is compressed by using the default compression algorithm.

COMPRESSION_FORMAT_LZNT1

0x0002

The file or directory is compressed by using the LZNT1 compression algorithm.

All other values

Reserved for future use.

CompressionUnitShift: (1 byte): An 8-bit unsigned integer that contains the compression unit shift that is the number of bits by which to left-shift a 1 bit to arrive at the compression unit size. The compression unit size is the number of bytes in a compression unit, that is, the number of bytes to be compressed. This value is implementation-defined.

ChunkShift: (1 byte): An 8-bit unsigned integer that contains the compression chunk size in bytes in log 2 format. The chunk size is the number of bytes that the operating system's implementation of the Lempel-Ziv compression algorithm tries to compress at one time. This value is implementation-defined.

ClusterShift: (1 byte): An 8-bit unsigned integer that specifies, in log 2 format, the amount of space that MUST be saved by compression to successfully compress a compression unit. If that amount of space is not saved by compression, the data in that compression unit MUST be stored uncompressed. Each successfully compressed compression unit MUST occupy at least one cluster that is less in bytes than an uncompressed compression unit. Therefore, the cluster shift is the number of bits by which to left shift a 1 bit to arrive at the size of a cluster. This value is implementation-defined.

Reserved: (3 bytes): A 24-bit reserved value. This field SHOULD be set to 0x000000 and MUST be ignored.