This is not exactly what I want, and I've already looked at these things. I am not looking to compress all the output in response to the request from the browser. I am looking to have my CGI give output as either 'gzipped' or as 'text' depending on an option selected by the user. If selected, I want the output to come as an file attachment.