Share via


ASP.NET HTTPModule for HTTP Compression

I finally got around to coding up a version of an ASP.NET HttpModule that does HTTP Compression for GotDotNet.  I have probably coded this module a half a dozen times over the last 4+ years.  So here it is!

There are a number of implementations out there, but this one has some advantages.

1) Supports both GZIP and DEFLATE.
2) Does NOT break when calling Response.End
3) Does NOT try and compress JPEG, TIFF, or GIF images.
4) Uses .NET 2.0 Compression Libraries

Check it out here!

NOTE:  This handles ContentType for most situations.  It depends on where the ASP.NET Http Handler being used sets the ContentType.  I am trying at this moment to fix this for the WebResources.axd.