I have a RESTful WCF web service written in C# using .NET 4.0, and I'd like the responses to be compressed using GZip or deflate. (I might need to support compression for requests too, but that is not yet a requirement). It will be deployed as a windows service, i.e. self-hosted WCF service, as IIS hosting is not an option.
My searches have so far come up short. Most hits are either for turning on compression in IIS or writing a custom message encoder for a SOAP based service, neither or which fit my scenario.
If you have any pointers for how to do this, it would be greatly appreciated!