Xceed Real-Time Zip for .NET Documentation
GZipCompressedStream Constructor(Stream,CompressionLevel,Boolean)


Xceed.Compression.Formats Assembly > Xceed.Compression.Formats Namespace > GZipCompressedStream Class > GZipCompressedStream Constructor : GZipCompressedStream Constructor(Stream,CompressionLevel,Boolean)
The stream to write to and read from.
A Xceed.Compression.CompressionLevel value representing the compression level to use.
If true, this stream can only be read from and the header will be read immediately. If false, this stream can be used for reading or writing but no header is read until a call to FormattedCompressedStream.Write or FormattedCompressedStream.Read.
Initializes a new instance of the GZipCompressedStream class specifying the inner stream to write to and read from and the compression level.
Syntax
'Declaration
 
Public Function New( _

   ByVal inner As Stream, _

   ByVal level As CompressionLevel, _

   ByVal readHeader As Boolean _

)
'Usage
 
Dim inner As Stream

Dim level As CompressionLevel

Dim readHeader As Boolean

 

Dim instance As New GZipCompressedStream(inner, level, readHeader)
public GZipCompressedStream( 

   Stream inner,

   CompressionLevel level,

   bool readHeader

)

Parameters

inner
The stream to write to and read from.
level
A Xceed.Compression.CompressionLevel value representing the compression level to use.
readHeader
If true, this stream can only be read from and the header will be read immediately. If false, this stream can be used for reading or writing but no header is read until a call to FormattedCompressedStream.Write or FormattedCompressedStream.Read.
Remarks

If the inner stream is readonly, the compressed stream will read the header at construction. Because the GZip compression format only supports the Deflate compression method, all data compressed with the GZipCompressedStream class will be compressed using the Xceed.Compression.CompressionMethod.Deflated compression method.

The compression level only applies to the Deflated and Deflated64 compression methods.  It does not apply to the BZip2, BWT, or PPMd compression methods.

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

GZipCompressedStream Class
GZipCompressedStream Members
Overload List