This documentation is for the old version. Go to the latest Graphics Mill docs

ZipCompressor.Compress Method (IntPtr, UInt32, IntPtr, UInt32)

Compresses a byte array with the deflate algorithm (ZIP).

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Shared Function Compress ( _
	originData As IntPtr, _
	originDataSize As UInteger, _
	compressedData As IntPtr, _
	compressedDataSize As UInteger _
) As UInteger
C#
public static uint Compress(
	IntPtr originData,
	uint originDataSize,
	IntPtr compressedData,
	uint compressedDataSize
)

Parameters

originData

Type: System.IntPtr

The pointer to unmanaged byte array which stores the data you need to compress.
originDataSize

Type: System.UInt32

The integer value which specifies the length of the input buffer.
compressedData

Type: System.IntPtr

The pointer to the unmanaged byte array which will get the compressed data. The memory should be allocated by caller.
compressedDataSize

Type: System.UInt32

The integer value which specifies the lenght of the output buffer.

Return Value

The integer value which specifies how many bytes were actually allocated during compression.

Remarks

You should guaranty that the length of the output buffer enough to hold the result of compression.

See Also

Reference