Xceed .NET Libraries Documentation
WillUseCompression Method


Xceed.Compression Assembly > Xceed.Compression Namespace > CompressedStream Class : WillUseCompression Method
The compression method.
The compression level.
Determines whether a compression format will be used, based on a specified compression method and level.
Syntax
'Declaration
 
Public Shared Function WillUseCompression( _

   ByRef method As CompressionMethod, _

   ByRef level As CompressionLevel _

) As Boolean
'Usage
 
Dim method As CompressionMethod

Dim level As CompressionLevel

Dim value As Boolean

 

value = CompressedStream.WillUseCompression(method, level)
public static bool WillUseCompression( 

   ref CompressionMethod method,

   ref CompressionLevel level

)

Parameters

method
The compression method.
level
The compression level.

Return Value

true if compression will be used; false otherwise.
Remarks

The method changes the specified values if necessary. If the specified compression method is Stored, it sets the compression level to Normal.

If the specified compression level is None, it sets the compression method to Stored unless the Deflated or Deflated64 compression method has been specified, since these methods support writing uncompressed data in their format.

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

CompressedStream Class
CompressedStream Members