Add gzip compression support

This pr adds support for gzip format in record writer which is what we use here at Shopify.

cc @drdee @kengoodhope