Xceed.Compression.Silverlight.v6.6 Assembly > Xceed.Compression Namespace > CompressedStream Class : SetupPPMdCompression Method |
'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)
public static ManagedPPMdCompressor SetupPPMdCompression( Stream compressedStream, CompressionLevel level )
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.
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