Make gzip optional

By default the Content-Encoding header was being set. I have changed this to make it optional.