Changed implementation of GZip output handling