Compression testing on Windows 7 & WS08 R2

Posted: Jun 18, 2009  1 comments  

Average Rating

Tags
compression
Config

Share this Post

So I've done some recent testing on Compression and in the process I thought I should write up a short blog on how to configure adding new scheme's to compression as well as configuring the compressionLevel for each scheme.  (I assume that static and dynamic compression is already installed.)  You may have noticed Kanwal's blog http://blogs.iis.net/ksingla/archive/2009/02/16/iis-7-5-updates-to-custom-errors-and-compression.aspx  and here is his holder post on the topic http://blogs.iis.net/ksingla/archive/2006/06/13/changes-to-compression-in-iis7.aspx  as well, our great documentation lead wrote up the API that you can use to implement your own compression scheme/algorithm.  http://msdn.microsoft.com/en-us/library/dd692872.aspx  You can read those articles to learn more about it.  If you'd like some sample code on how to use it, please let me know and I'll post up a stripped down version of the test code I wrote.  

This blog is simply walking you through how to configure this feature.  I use Configuration Editor to do it. 

Configuration Editor is part of the IIS Admin Pack for Windows Server 2008 and Windows Vista SP1, and it is built-in to Windows 7 and Windows Server 2008 R2.  You can download it via this site http://www.iis.net/extensions/AdministrationPack or through Web Platform Installer. 

First, open the IIS UI, at the Server level. Then find the Configuration Editor in the Mangement section of the UI.

 

Open Configuration Editor (double click), and in the "Section" dropdown, select "system.webServer/httpCompression"

 

The first row is the Collection of compression schemes.  Highlight the row, and then select the "..." button to open the collection.

Here you'll see the default gzip scheme with it's associated settings.  Here is where you can change the staticCompressionLevel and the dynamicCompressionLevel up or down as you see fit. 

You'll note that on the right side, you can select "Add" and add a new item to this list.  This is where you add your own dll that you've written that implements the functions defined in the above MSDN article. 

 

Now you have configured IIS to properly load and use your DLL for static and dynamically compressed content.  Let me know if you have any questions, I'll probably get some sample code posted up here next week; but I'd like to know if anyone has interest; this is actually a powerful option to work on changing the response on the fly without doing a lot of work. 

Dave