Add optional gzip compression for REST API responses