Xceed .NET Libraries Documentation
Xceed.Compression.Formats Assembly / Xceed.Compression.Formats Namespace / XceedCompressedStreamEx Class / XceedCompressedStreamEx Constructor / XceedCompressedStreamEx Constructor(Stream,CompressionMethod,CompressionLevel,Boolean,String)
The stream to write to and read from.
A Xceed.Compression.CompressionMethod value representing the compression method to use.
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.
The encryption password to use.


In This Topic
    XceedCompressedStreamEx Constructor(Stream,CompressionMethod,CompressionLevel,Boolean,String)
    In This Topic
    Initializes a new instance of the XceedCompressedStreamEx class specifying the inner stream to write to and read from, the compression method and level, and the encryption password to use.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal inner As Stream, _
       ByVal method As CompressionMethod, _
       ByVal level As CompressionLevel, _
       ByVal readHeader As Boolean, _
       ByVal encryptionPassword As String _
    )
    'Usage
     
    Dim inner As Stream
    Dim method As CompressionMethod
    Dim level As CompressionLevel
    Dim readHeader As Boolean
    Dim encryptionPassword As String
     
    Dim instance As New XceedCompressedStreamEx(inner, method, level, readHeader, encryptionPassword)
    public XceedCompressedStreamEx( 
       Stream inner,
       CompressionMethod method,
       CompressionLevel level,
       bool readHeader,
       string encryptionPassword
    )

    Parameters

    inner
    The stream to write to and read from.
    method
    A Xceed.Compression.CompressionMethod value representing the compression method to use.
    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.
    encryptionPassword
    The encryption password to use.
    Remarks

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

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

    The PPMd algorithm uses a custom memory management system called SubAllocator. In a zip file, the memory size the SubAllocator uses is defined in the WinZip PPMd header for the compressed file and this header's value is used when decompressing the data. In general, WinZip uses 64Mb. Since the algorithm used was not optimized from the original PPMd version I revision 1, the SubAllocator initially requires the total amount of memory specified in the PPMd compressor. This means you must have at least 64 free Mb of RAM when using this compression method.

    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