Project DescriptionCollection of WCF extensions. The current version provides a compression channel.
WCF Compression ChannelThe compression channel can be used as any other channel, simply by adding it to your custom binding. This can be done both in configuration and in code.
CompressionBindingElement element = new CompressionBindingElement();
element.Algorithm = CompressionAlgorithm.Deflate;
element.Level = CompressionLevel.Maximum;
CustomBinding binding = new CustomBinding();
binding.Elements.Add(element);
binding.Elements.Add(SecurityBindingElement.CreateSspiNegotiationBindingElement());
binding.Elements.Add(new TextMessageEncodingBindingElement());
binding.Elements.Add(new HttpTransportBindingElement());