Hi, thank you for contacting JustAnswer.com. My name is***** will do my best to provide the right answer to your question.
I agree that you cannot have content or 'strings' be searched-and-replaced while it is GZip'd.
So before the content or string is searched-and-replaced, you need it not to be in a zipped or GZip'd state.
You might need to use mod_deflate (a de-compresser or un-Zip module) before doing the search and replace, then output it from the script as GZip'd output.
Or is that how you are trying to do it already?
I am sorry - I find that my CGI expertise is too basic for me to help you with these files. I have looked at them and don't find anything to offer in the way of advice.
The only right thing for me to do in this sort of case, is to admit the fact - that I cannot help you further with this case - and Opt Out, opening this case to a CGI-expert Expert in this category.
This case might need a change to the Programming category also, so I will flag it as such.
I have Opted Out. Thanks for your patience.