DotNetCompression Class Reference for Windows Phone
Compress(Stream,Int64,Int32) Method






The stream with bytes to compress.
The number of bytes from the stream 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 a number of bytes from the specified stream and returns an array of compressed bytes.
Syntax
'Declaration
 
Public Overloads Overridable Function Compress( _
   ByVal input As System.IO.Stream, _
   ByVal bytesToCompress As System.Long, _
   ByVal compressionLevel As System.Integer _
) As System.Byte()
'Usage
 
Dim instance As CompressionFactory
Dim input As System.IO.Stream
Dim bytesToCompress As System.Long
Dim compressionLevel As System.Integer
Dim value() As System.Byte
 
value = instance.Compress(input, bytesToCompress, compressionLevel)
public virtual System.byte[] Compress( 
   System.IO.Stream input,
   System.long bytesToCompress,
   System.int compressionLevel
)
public function Compress( 
    input: System.IO.Stream;
    bytesToCompress: System.Int64;
    compressionLevel: System.Integer
): System.array of Byte; virtual; 
public function Compress( 
   input : System.IO.Stream,
   bytesToCompress : System.long,
   compressionLevel : System.int
) : System.byte[];
public: virtual System.byte[]* Compress( 
   System.IO.Stream* input,
   System.long bytesToCompress,
   System.int compressionLevel
) 
public:
virtual System.array<byte>^ Compress( 
   System.IO.Stream^ input,
   System.int64 bytesToCompress,
   System.int compressionLevel
) 

Parameters

input
The stream with bytes to compress.
bytesToCompress
The number of bytes from the stream 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