Xceed .NET Libraries Documentation
GZipCompressedStream Constructor(Stream,GZipHeader,CompressionLevel)


Xceed.Compression.Formats Assembly > Xceed.Compression.Formats Namespace > GZipCompressedStream Class > GZipCompressedStream Constructor : GZipCompressedStream Constructor(Stream,GZipHeader,CompressionLevel)
The stream to write to.
A reference to the GZipHeader object representing the compressed data's header.
A Xceed.Compression.CompressionLevel value representing the compression level to use.
Initializes a new instance of the GZipCompressedStream class specifying the inner stream to write to, the GZipHeader to use and the compression level.
Syntax
'Declaration
 
Public Function New( _
   ByVal inner As Stream, _
   ByVal header As GZipHeader, _
   ByVal level As CompressionLevel _
)
'Usage
 
Dim inner As Stream
Dim header As GZipHeader
Dim level As CompressionLevel
 
Dim instance As New GZipCompressedStream(inner, header, level)
public GZipCompressedStream( 
   Stream inner,
   GZipHeader header,
   CompressionLevel level
)

Parameters

inner
The stream to write to.
header
A reference to the GZipHeader object representing the compressed data's header.
level
A Xceed.Compression.CompressionLevel value representing the compression level to use.
Remarks

This constructor can only be used when writing to the inner stream. It makes sure to write the GZipHeader even if Write has not been called before System.IO.Stream.Close.

Because the GZip compression format only supports the Deflate compression method, all data compressed with the GZipCompressedStream class will be compressed using the Deflated compression method.

If the inner stream is readonly, the compressed stream will read the header at construction.

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