gzip and base64 encode output