###User Defined Function###
_WinAPI_CompressBuffer

###Description###
Compresses a buffer with specified compression format and engine type.

###Syntax###
#include <WinAPISys.au3>
_WinAPI_CompressBuffer ( $pUncompressedBuffer, $iUncompressedSize, $pCompressedBuffer, $iCompressedSize [, $iFormatAndEngine = 0x0002] )


###Parameters###
@@ParamTable@@
$pUncompressedBuffer
	A pointer to a caller-allocated buffer that contains the data to be compressed.
$iUncompressedSize
	The size of the uncompressed buffer, in bytes.
$pCompressedBuffer
	A pointer to a caller-allocated buffer that receives the compressed data.
$iCompressedSize
	The size of the compressed buffer, in bytes.
$iFormatAndEngine
	[optional] A bitmask that specifies the compression format and engine type.
	This parameter must be set to a valid bitwise OR combination of one format type and one engine type.
		$COMPRESSION_FORMAT_LZNT1 (Default)
		$COMPRESSION_FORMAT_XPRESS
		$COMPRESSION_FORMAT_XPRESS_HUFF

		$COMPRESSION_ENGINE_STANDARD (Default)
		$COMPRESSION_ENGINE_MAXIMUM
@@End@@

###ReturnValue###
@@ReturnTable@@
Success 	The size of the compressed data stored in compressed buffer, in bytes.
Failure 	0 and sets the @error flag to non-zero, @extended flag may contain the NTSTATUS error code.
@@End@@


###Remarks###
The <a href="_WinAPI_CompressBuffer.htm">_WinAPI_CompressBuffer()</a> function takes as input an uncompressed buffer and produces its compressed equivalent provided that the compressed data fits within the specified destination buffer.

To decompress a compressed buffer, use the <a href="_WinAPI_DecompressBuffer.htm">_WinAPI_DecompressBuffer()</a> function.


###Related###
_WinAPI_DecompressBuffer


###See Also###
@@MsdnLink@@ RtlCompressBuffer


###Example###
@@IncludeExample@@
