Here is my guess: you are creating a file using GZip algorithm, but you name your file as *.zip. ZIP is a different algorithm.
Please see:
http://en.wikipedia.org/wiki/Gzip[
^],
http://en.wikipedia.org/wiki/ZIP_%28file_format%29[
^],
http://en.wikipedia.org/wiki/List_of_archive_formats[
^].
As you are trying to use ZIP file naming schema, the Windows Shell can use "file type association" to launch some default application used to load the file; in your case, named as *.zip. I have no idea what do you mean by "I'm opening it", but chances are, your Shell opens some application which supports ZIP files (WinZip, or the packer embedded in File Manager like Explorer or something else — you should know better). This application may assume that the file is a ZIP file, while its context is GZip-compressed data. No wonder, from the standpoint of ZIP format, this file is considered corrupted.
Try to change the name to *.GZip and try again. It should work.
—SA