project, we ported their work into the project class hierarchy and added a GZConnectionRequest which will automatically unzip an HTTP response if it is indeed gzipped.
By default this class doesn’t request gzipped data but its pretty easy to do so just add the HTTP header
Accept-Encoding: gzip e.g.:
GZConnectionRequest con = new GZConnectionRequest();
Do the rest as usual and you should have smaller responses by potential.
We thought about adding this capability to the global ConnectionRequest but eventually decided not to do so since it will increase the size of the distribution to everyone. If you do not need the gzip functionality the obfuscator will just strip it out during the compile process.
Notice: This post was automatically converted using a script from an older blogging system. Some elements might not have come out as intended…. If that is the case please let us know via the comments section below.
This is great news ! I will update my blog post about compression with this, keep up the good work !
Is it also supported on the WebBrowser component when fetching HTML?
Since the web browser uses native connections and doesn’t go thru connection request gzip should “just work” for that case.