close gzip stream and zend bytes AFTER they are added to the buffer