title: How to get gzip compression working in WCF 4.5
body: <p>WCF 4.5 supports GZIP without third party libraries or handwritten extensions. 
  I got it working via TCP Binding, but cannot find a way to get it working via HTTP Binding.
  my wcf - Service is self hosted in a windows service.</p>
  
  <p><strong>Addon: i am not allowed to use IIS; i can't switch to any WCF replacement.</strong></p>
  
  <p>this works with gzip:</p>
  
  <pre><code>binding="customBinding" bindingConfiguration="tcpCompressionBinding" name="tcp" 
  </code></pre>
  
  <p>and this is what i currently use for http:</p>
  
  <pre><code>binding="basicHttpBinding" bindingConfiguration="httpBinding" name="http"
  </code></pre>
  
  <p>The documentation does not really help me:
  <a href="http://msdn.microsoft.com/en-us/library/dd456789.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/dd456789.aspx</a>.</p>
  
  <p>But, according to this it should work:</p>
  
  <blockquote>
    <p>Beginning with WCF 4.5 the WCF binary encoder adds support for compression. The type of compression is configured with the CompressionFormat property. Both the client and the service must configure the CompressionFormat property. Compression will work for HTTP, HTTPS, and TCP protocols. If a client specifies to use compression but the service does not support it a protocol exception is thrown indicating a protocol mismatch. For more information, see Choosing a Message Encoder</p>
  </blockquote>