I am not asking for an online tool. I'm also not asking how to turn on or turn off gzip.

What I want to know, is how, within my php, that I can check to see if gzip will encode the current buffer or not.