WCF-Xtensions Class Reference for .NET
TransportCompressionLevel Property (WcfXTransportSettingsElement)






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
[System.Configuration.ConfigurationProperty(Name="transportCompressionLevel", 
   Options=ConfigurationPropertyOptions.None, 
   IsDefaultCollection=false, 
   IsRequired=false, 
   IsKey=false)]
public System.int TransportCompressionLevel {get; set;}
public read-write property TransportCompressionLevel: System.Integer; 
System.Configuration.ConfigurationPropertyAttribute(Name="transportCompressionLevel", 
   Options=ConfigurationPropertyOptions.None, 
   IsDefaultCollection=, 
   IsRequired=, 
   IsKey=)
public function get,set TransportCompressionLevel : System.int
[System.Configuration.ConfigurationProperty(Name="transportCompressionLevel", 
   Options=ConfigurationPropertyOptions.None, 
   IsDefaultCollection=false, 
   IsRequired=false, 
   IsKey=false)]
public: __property System.int get_TransportCompressionLevel();
public: __property void set_TransportCompressionLevel( 
   System.int value
);
[System.Configuration.ConfigurationProperty(Name="transportCompressionLevel", 
   Options=ConfigurationPropertyOptions.None, 
   IsDefaultCollection=false, 
   IsRequired=false, 
   IsKey=false)]
public:
property System.int TransportCompressionLevel {
   System.int get();
   void set (    System.int value);
}
'Declaration
 
<System.Configuration.ConfigurationPropertyAttribute(Name="transportCompressionLevel", 
   Options=ConfigurationPropertyOptions.None, 
   IsDefaultCollection=False, 
   IsRequired=False, 
   IsKey=False)>
Public Property TransportCompressionLevel As System.Integer
 
'Usage
 
Dim instance As WcfXTransportSettingsElement
Dim value As System.Integer
 
instance.TransportCompressionLevel = value
 
value = instance.TransportCompressionLevel
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

WcfXTransportSettingsElement Class
WcfXTransportSettingsElement Members

Send Feedback