No
WCF Compression is done using a custom message encoder. It's basically the same concept behind the Gzip Message Encoder included in WCF Samples.
You can take a look on System.ServiceModel.Channels.MessageEncoder
. Basically, A majority of the encoding work takes place in read/write methods (Streaming/Message, Async/Sync, ...) There is also a very specific optimisation for session, but I don't think this will help you.
Not specific to WCF, using Gzip reduce on average, content encoding saved 75% off of text files (HTML, CSS, and JavaScript) and 37% overall. Gzipping is only beneficial for larger resources. Due to the overhead and latency of compression and decompression, you should only gzip files above a certain size threshold (a few KB); Gzipping files below can actually make them larger.
So, Compression is mostly useful if network bandwidth is a bottleneck (sending large messages or where bandwidth is constrained). In the case where the CPU is the bottleneck, compression will decrease throughput. As for every optimizations, appropriate testing must be done in a simulated environment to find out if this benefits the application.
If the service is Web-hosted in IIS, a service can be configured to send a compressed response using the dynamic compression module (using HTTP headers Content-Encoding
) without using WCF stuff