Implement gzip compression, with a default behaviour of compressing. Closes #31.