First of all, thank you for this useful code.

Only a heads-up:
When compressing a response, Fiddler complains about a HTTP protocol violation, because content-length still has the UNcompressed content size.

Bye