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






The array 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 data() As System.Byte, _
   ByVal compressionLevel As System.Integer _
) As System.Byte()
'Usage
 
Dim instance As CompressionFactory
Dim data() As System.Byte
Dim compressionLevel As System.Integer
Dim value() As System.Byte
 
value = instance.Compress(data, compressionLevel)
public virtual System.byte[] Compress( 
   System.byte[] data,
   System.int compressionLevel
)
public function Compress( 
    data: System.Bytearray of;
    compressionLevel: System.Integer
): System.array of Byte; virtual; 
public function Compress( 
   data : System.byte[],
   compressionLevel : System.int
) : System.byte[];
public: virtual System.byte[]* Compress( 
   System.byte[]* data,
   System.int compressionLevel
) 
public:
virtual System.array<byte>^ Compress( 
   System.array<byte>^ data,
   System.int compressionLevel
) 

Parameters

data
The array 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