QueryDecompressorInformation function (compressapi.h)

Use this function to query information about a particular compression algorithm.


BOOL QueryDecompressorInformation(
  [in]  DECOMPRESSOR_HANDLE        DecompressorHandle,
  [in]  COMPRESS_INFORMATION_CLASS CompressInformationClass,
  [out] PVOID                      CompressInformation,
  [in]  SIZE_T                     CompressInformationSize


[in] DecompressorHandle

Handle to the decompressor being queried for information.

[in] CompressInformationClass

A value of the COMPRESS_INFORMATION_CLASS enumeration that identifies the type of information.

[out] CompressInformation

Information for the compression algorithm written as bytes. The maximum size in bytes of this information is given by CompressInformationSize.

[in] CompressInformationSize

Maximum size in bytes of the information.

Return value

Returns TRUE to indicate success and FALSE otherwise. Call GetLastError to determine cause of failure.


If the compression algorithm fails for some internal reason, the error from GetLastError can be ERROR_FUNCTION_FAILED. If the system cannot locate the compression algorithm handle, the error can be ERROR_INVALID_HANDLE. If the compression algorithm does not allow the information class, the error can be ERROR_UNSUPPORTED_TYPE. If the buffer is too small to hold the value, the error can be ERROR_INSUFFICIENT_BUFFER.


Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header compressapi.h
Library Cabinet.lib
DLL Cabinet.dll

See also

Compression API Functions