Skip to main content
GameDev.net gamedev.net
🔒 Locked

Can gzip open Windows .zip files?

Started by Simian Man Aug 29, 2005 at 6:49 PM 11 replies 10.2k views
Original Post
Simian Man
Simian Man
The thread name really says it all. I am wondering because I want to put some source code on my website so anyone can download it, but it would be a pain for me to put it in .tar.gz
rollo
rollo
gzip can't open normal zip files, but I think pretty much every linux distribution around comes with zip support too. At least all the ones I'v used. not sure about Mac though.
Fruny
Fruny
When gzip doesn't work, I usually try unzip.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Scarfy
Scarfy
Quote:
Original post by Simian Man
The thread name really says it all. I am wondering because I want to put some source code on my website so anyone can download it, but it would be a pain for me to put it in .tar.gz


It would be a pain..?

Assuming your game is just sitting in one directory (called 'game' for example), I don't see what is such a big deal about typing,

tar zcf MyGame.tar.gz game

Which will create a gzipped tar file containing everything in the game directory.
Parallel RealitiesProject: Starfighter
Simian Man
Simian Man
Well you see, It is the code that I want to put up. It is in about 20 files on my Windows machine. To put it in a tarball, I would have to burn it to a CD, take it to school, put it on my school drive, secure shell to a Linux machine (via Putty), put it all in my Linux account, create the tar ball, then do the previous again in reverse.

That's why it would be a pain (compared to using winzip), but since the response was pretty much lukewarm to Linux users being able to unzip it, I decided to do it anyway.
SiCrane
SiCrane
You could just install cygwin on your Windows box.
Peregrin
Peregrin
7-Zip has a Windows version, and it can create gzip files.
Jooleem. Get addicted.
Simian Man
Simian Man
Thanks guys.

googlyeyes: that is an awesome link thanks!
Leffe
Leffe
Quote:
Original post by googlyeyes
From what I've seen most common linux programs have win32 ports, usually a little googling is all that is needed.


I prefer GnuWin32.
Q-Parser
Q-Parser
Simple answer: Yes. I used it several times. 'gunzip -S zip filename.zip' should do the trick.
255
255
Quote:
Original post by j0seph
Simple answer: Yes. I used it several times. 'gunzip -S zip filename.zip' should do the trick.


From the gunzip man-page:
Quote:

Files created by zip can be uncompressed by gzip only if they have a
single member compressed with the 'deflation' method. This feature is
only intended to help conversion of tar.zip files to the tar.gz format.
To extract a zip file with a single member, use a command like gunzip
members, use unzip instead of gunzip.
kdogg
kdogg
Will winzip not gzip files? I swear i've extracted them in win xp before. of course, i wouldn't be shocked to see windows doesn't ship with the ability to extract files compressed in an open source format.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.