Xceed .NET Libraries Documentation
Xceed.Compression Assembly / Xceed.Compression Namespace / CompressedStream Class / SetupPPMdCompression Method
The Stream that will be compressed.
The CompressionLevel that will be used.


    SetupPPMdCompression Method
    Prepares PPMd compression using the specified Stream and compression level.
    Syntax
    'Declaration
     
    Public Shared Function SetupPPMdCompression( _
       ByVal compressedStream As Stream, _
       ByVal level As CompressionLevel _
    ) As ManagedPPMdCompressor
     
    'Usage
     
    Dim compressedStream As Stream
    Dim level As CompressionLevel
    Dim value As ManagedPPMdCompressor
     
    value = CompressedStream.SetupPPMdCompression(compressedStream, level)

    Parameters

    compressedStream
    The Stream that will be compressed.
    level
    The CompressionLevel that will be used.

    Return Value

    The ManagedPPMdCompressor that will perform the compression.
    Remarks

    The method uses ManagedPPMdCompressor.ComputePPMdOptions to compute the PPMd parameters from the compression level. Then, it calls ManagedPPMdCompressor.WritePPMdZipHeader to write the PPMd parameters to the stream. Finally, it creates and returns an instance of ManagedPPMdCompressor with the computed PPMd parameters.

    This method effectively implements the Zip format as pertains to PPMd compression for the CompressedStream class.

    The method can be useful when called from Xceed.Compression.Formats.FormattedCompressedStream.WriteHeader, in which it can be used as a complete custom header or as part of a larger header.

    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