Can I use net.TCP with GZip technology in WCF

Is it possible to use the net.TCP binding to implement GZip in WCF, or can it be configured only with the Http and WsHttp bindings.

+4
source share
2 answers

I do not believe that WCF supports GZip encoding using TCP socket binding, but there is nothing that would prevent you from sending GZiped compressed data through a wire and manually compressing it using methods built into the .NET platform: http://msdn.microsoft .com / en-us / library / system.io.compression.gzipstream.aspx .

Before taking this route, I highly recommend evaluating other performance enhancements in your TCP services, as described here: Transfer the smallest amount of data over the cable using WCF

+5
source

Wcf 4.5 RC support message encoder out of the box http://msdn.microsoft.com/en-us/library/aa751889(v=vs.110).aspx

+4
source

Source: https://habr.com/ru/post/1389991/


All Articles