Use gzencode instead of gzcompress

```gzencode``` produces a gzip compatible file format. ```gzcompress``` produces something slightly different.

See here for further details:  http://stackoverflow.com/questions/22950285/how-output-data-with-gzip-header-and-not-deflate-header