Compresses a source buffer into a target buffer, using the ZLib library.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public static uint ZLibGZip(
	byte[] target,
	uint target_size,
	byte[] source,
	uint source_size
)
Visual Basic (Declaration)
Public Shared Function ZLibGZip ( _
	target As Byte(), _
	target_size As UInteger, _
	source As Byte(), _
	source_size As UInteger _
) As UInteger
Visual C++
public:
static unsigned int ZLibGZip(
	array<unsigned char>^ target, 
	unsigned int target_size, 
	array<unsigned char>^ source, 
	unsigned int source_size
)

Parameters

target
Type: array< System..::.Byte >[]()[]
Pointer to the target buffer.
target_size
Type: System..::.UInt32
Size of the target buffer. Must be at least 0.1% larger than source_size plus 24 bytes.
source
Type: array< System..::.Byte >[]()[]
Pointer to the source buffer.
source_size
Type: System..::.UInt32
Size of the source buffer.

Return Value

The actual size of the compressed buffer, or 0 if an error occurred.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also