WCF – Compression support for Binary Encoder

Windows Communication Foundation v4.5, Compression support is available for Binary Encoder through CompressionFormat property.

This Compression feature can work for HTTP, HTTPS as well as TCP protocol.

CompressionFormat property can have one of the possible CompressionFormat enum values:

  • Deflate – Deflate Compression
  • GZip – GZip Compression
  • None – No compression at all.

For compression support to work properly, there are few constraints as follows:

  • Client as well as Service both must have configure CompressionFormat property. Client and Service will not be unable to communicate unless both agreed to use compression.
  • Custom binding will be used to enable compression support for Binary Encoder.

© 2015, www.techkatak.com. All rights reserved.