Providing gzip request capability in ResourceClient

Oct 21, 2011 at 9:30 AM

Hi,

Are there any plans/thoughts on providing the ability to request and then consume gzipped streams in the ResourceClient implementation?

Thanks,

Ian

Oct 22, 2011 at 5:35 PM

I presume this is a 7.1 (mango) app, if so this is already supported implicitly via the 'WithHeader' method on the ResourceClient - you define your own implementation of IHeader interface.

We are going to explicitly add a method called 'WithGzip' to be more explicit - this is being done now.

Example IHeader implementation:

 public class GZipHeader : IHeader
    {
        public string Value(object request, Uri url)
        {
            return "gzip";
        }

        public string Name
        {
            get { return "accept-encoding"; }
        }
    }

Oct 22, 2011 at 10:46 PM

GZip compression support has been added for HTTP responses.

A spike demo app has also been added 'GZipDemo' in 7.1 Spikes directory

http://wp7contrib.codeplex.com/SourceControl/changeset/changes/70687

Oct 23, 2011 at 3:50 PM

What a fantastic turn-around  ... many thanks!! 

Will have a look at the spike and implementation.

Ian

Oct 24, 2011 at 6:50 PM

Hi,

Looks like ZlibBaseStream.cs needs checking in as not in package.

Thanks again,

Ian

Oct 25, 2011 at 4:07 PM

Added missing file.