DotNetCompression Class Reference for Windows Phone
Compress(Byte[],Int32,Int32,Int32) Method






The array with bytes to compress.
The offset in array where bytes to compress start.
The number of bytes to compress.
Specifies the compression level to be used when compressing. It may be set to an integer from 1 to 9. Generally, lower compression levels result in faster performance while higher compression levels result in better compression.
Compresses an array of bytes and returns an array of compressed bytes.
Syntax
'Declaration
 
Public Overloads Overridable Function Compress( _
   ByVal buffer() As System.Byte, _
   ByVal offset As System.Integer, _
   ByVal count As System.Integer, _
   ByVal compressionLevel As System.Integer _
) As System.Byte()
'Usage
 
Dim instance As CompressionFactory
Dim buffer() As System.Byte
Dim offset As System.Integer
Dim count As System.Integer
Dim compressionLevel As System.Integer
Dim value() As System.Byte
 
value = instance.Compress(buffer, offset, count, compressionLevel)
public virtual System.byte[] Compress( 
   System.byte[] buffer,
   System.int offset,
   System.int count,
   System.int compressionLevel
)
public function Compress( 
    buffer: System.Bytearray of;
    offset: System.Integer;
    count: System.Integer;
    compressionLevel: System.Integer
): System.array of Byte; virtual; 
public function Compress( 
   buffer : System.byte[],
   offset : System.int,
   count : System.int,
   compressionLevel : System.int
) : System.byte[];
public: virtual System.byte[]* Compress( 
   System.byte[]* buffer,
   System.int offset,
   System.int count,
   System.int compressionLevel
) 
public:
virtual System.array<byte>^ Compress( 
   System.array<byte>^ buffer,
   System.int offset,
   System.int count,
   System.int compressionLevel
) 

Parameters

buffer
The array with bytes to compress.
offset
The offset in array where bytes to compress start.
count
The number of bytes to compress.
compressionLevel
Specifies the compression level to be used when compressing. It may be set to an integer from 1 to 9. Generally, lower compression levels result in faster performance while higher compression levels result in better compression.

Return Value

The array of compressed bytes.
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

CompressionFactory Class
CompressionFactory Members
Overload List

Send Feedback