This is a function written a few years ago by Chemo. I have used it in multiple sites through the years and it has worked out very well.
What is does is compress your site server side to decrease the time to load page. It can be very useful for the few payment modules out there that do not play well with gzip compression.
All credit to Bobby Easland