abstracted out gzip into a general func passed into process-request