The RtlDecompressBufferEx function decompresses an entire compressed buffer.
NT_RTL_COMPRESS_API NTSTATUS RtlDecompressBufferEx( USHORT CompressionFormat, PUCHAR UncompressedBuffer, ULONG UncompressedBufferSize, PUCHAR CompressedBuffer, ULONG CompressedBufferSize, PULONG FinalUncompressedSize, PVOID WorkSpace );
A bitmask that specifies the compression format of the compressed buffer. This parameter must be set to COMPRESSION_FORMAT_LZNT1. The meaning of this and other related compression format values are as follows.
A pointer to a caller-allocated buffer (allocated from paged or non-paged pool) that receives the decompressed data from CompressedBuffer. This parameter is required and cannot be NULL.
The size, in bytes, of the UncompressedBufferbuffer.
A pointer to the buffer that contains the data to decompress. This parameter is required and cannot be NULL.
The size, in bytes, of the CompressedBuffer buffer.
A pointer to a caller-allocated variable that receives the size, in bytes, of the decompressed data stored in UncompressedBuffer. This parameter is required and cannot be NULL.
A pointer to a caller-allocated work space buffer used by the RtlDecompressBufferEx function during decompression. Use the RtlGetCompressionWorkSpaceSize function to determine the correct work space buffer size.
RtlDecompressBufferEx returns an appropriate error status value, such as one of the following.
||The CompressedBuffer buffer was successfully decompressed.|
||An invalid compression format was specified through the CompressionFormat parameter. If CompressionFormat is either COMPRESSION_FORMAT_NONE or COMPRESSION_FORMAT_DEFAULT (but not both), this value is returned.|
An invalid compression format was specified through the CompressionFormat parameter. If CompressionFormat is not one of the following, STATUS_UNSUPPORTED_COMPRESSION is returned:
||UncompressedBuffer is not large enough to contain the uncompressed data.|
The RtlDecompressBufferEx function takes as input an entire compressed buffer and produces its decompressed equivalent provided that the uncompressed data fits within the specified destination buffer.
To decompress only a portion of a compressed buffer (that is, a "fragment" of the buffer), use the RtlDecompressFragment function.
To compress an uncompressed buffer, use the RtlCompressBuffer function.
|Minimum supported client||Available in starting in Windows 8.|
|Header||ntifs.h (include Fltkernel.h, Ntifs.h)|