DotNetCompression Class Reference for Windows Phone
DeflateStream Constructor(Stream,CompressionMode,Int32)






The stream to compress or decompress.
One of the CompressionMode values that indicates the action to take.
Specifies the compression level to be used when compressing. It may be set to an integer from 0 to 9. Generally, lower compression levels result in faster performance while higher compression levels result in better compression. Compression level 0 provides no compression at all.
Initializes a new instance of the DeflateStream class.
Syntax
'Declaration
 
Public Function New( _
   ByVal stream As System.IO.Stream, _
   ByVal mode As CompressionMode, _
   ByVal compressionLevel As System.Integer _
)
'Usage
 
Dim stream As System.IO.Stream
Dim mode As CompressionMode
Dim compressionLevel As System.Integer
 
Dim instance As New DeflateStream(stream, mode, compressionLevel)
public DeflateStream( 
   System.IO.Stream stream,
   CompressionMode mode,
   System.int compressionLevel
)
public DeflateStream( 
    stream: System.IO.Stream;
    mode: CompressionMode;
    compressionLevel: System.Integer
); 
public function DeflateStream( 
   stream : System.IO.Stream,
   mode : CompressionMode,
   compressionLevel : System.int
);
public: DeflateStream( 
   System.IO.Stream* stream,
   CompressionMode mode,
   System.int compressionLevel
)
public:
DeflateStream( 
   System.IO.Stream^ stream,
   CompressionMode mode,
   System.int compressionLevel
)

Parameters

stream
The stream to compress or decompress.
mode
One of the CompressionMode values that indicates the action to take.
compressionLevel
Specifies the compression level to be used when compressing. It may be set to an integer from 0 to 9. Generally, lower compression levels result in faster performance while higher compression levels result in better compression. Compression level 0 provides no compression at all.
Remarks

By default, DeflateStream owns the underlying stream, so closing the stream also closes the underlying stream. Note that the state of the underlying stream can affect the usability of the stream. Also, no explicit checks are performed, so no additional exceptions are thrown when the new instance is created.

If an instance of the DeflateStream class is created with the mode parameter equal to Compress, header information is inserted immediately. If no further action occurs, the stream appears as a valid, empty, compressed file.

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

DeflateStream Class
DeflateStream Members
Overload List

Send Feedback