Xceed Real-Time Zip for .NET Documentation
Compress(Byte[],Int32,Int32,Boolean,Byte[]) Method


Xceed.Compression Assembly > Xceed.Compression Namespace > ManagedPPMdCompressor Class > Compress Method : Compress(Byte[],Int32,Int32,Boolean,Byte[]) Method
An array of bytes to compress. A maximum of count bytes are taken from this array and compressed. Cannot be null.
The byte offset in buffer at which to begin taking the data to compress. Cannot be less than 0.
The maximum number of bytes to be taken from buffer. Cannot be less than 0.
Indicates if this call ends the stream of data to compress.
An array of bytes containing the compressed data. Can be empty.
Compresses an array of bytes to an array of bytes.
Syntax
'Declaration
 
Public Overloads Overrides Function Compress( _

   ByVal buffer() As Byte, _

   ByVal offset As Integer, _

   ByVal count As Integer, _

   ByVal endOfData As Boolean, _

   ByRef compressed() As Byte _

) As Integer
'Usage
 
Dim instance As ManagedPPMdCompressor

Dim buffer() As Byte

Dim offset As Integer

Dim count As Integer

Dim endOfData As Boolean

Dim compressed() As Byte

Dim value As Integer

 

value = instance.Compress(buffer, offset, count, endOfData, compressed)
public override int Compress( 

   byte[] buffer,

   int offset,

   int count,

   bool endOfData,

   out byte[] compressed

)

Parameters

buffer
An array of bytes to compress. A maximum of count bytes are taken from this array and compressed. Cannot be null.
offset
The byte offset in buffer at which to begin taking the data to compress. Cannot be less than 0.
count
The maximum number of bytes to be taken from buffer. Cannot be less than 0.
endOfData
Indicates if this call ends the stream of data to compress.
compressed
An array of bytes containing the compressed data. Can be empty.

Return Value

A value representing the length of the compressed stream.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ManagedPPMdCompressor Class
ManagedPPMdCompressor Members
Overload List
Base Implementation in Compress