WCF-Xtensions Class Reference for .NET
CompressionLevel Property (ContentNegotiationBindingElement)






Gets and sets the compression level to be applied when compression is used, were 1 is for fastest compression and 9 for maximum compression.
Syntax
public System.int CompressionLevel {get; set;}
public read-write property CompressionLevel: System.Integer; 
public function get,set CompressionLevel : System.int
public: __property System.int get_CompressionLevel();
public: __property void set_CompressionLevel( 
   System.int value
);
public:
property System.int CompressionLevel {
   System.int get();
   void set (    System.int value);
}
'Declaration
 
Public Property CompressionLevel As System.Integer
 
'Usage
 
Dim instance As ContentNegotiationBindingElement
Dim value As System.Integer
 
instance.CompressionLevel = value
 
value = instance.CompressionLevel
Remarks

At compression level 1 the emphasis is on minimum consumption of resources, so the writer configures the compression algorithm for fast processing performance and low memory use.

At compression level 9 the emphasis is on maximum compression, so the writer configures the compression algorithm to produce the smallest compressed data size.

At intermediate compression levels the writer configures the compression algorithm to a provide a progressive transition between levels 1 and 9.

The efficiency of compression algorithms varies depending on the data to be compressed. It is possible that minimum consumption of resources will be provided by a compression level other than 1, and maximum compression by a compression level other than 9. It is suggested that you try specifying different compression levels to find out which one is most suitable for your use case and requirements.

Some compression algorithms cannot be configured. In such cases, specifying different compression levels has no effect.

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

ContentNegotiationBindingElement Class
ContentNegotiationBindingElement Members

Send Feedback