Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use WinZip to zip entire directories of code and send them to a fellow programmer. He makes changes and sends the directories of code back to me.

Ignoring the fact that this is not a good way to keep the code clean when we are both working on it, I notice that his zip files are far smaller than mine, with basically the same data inside (mine range around 36,000 KB, his 2,000 KB). I believe he is also using WinZip.

What's going on here, and how can I make mine "more compressed"?

share|improve this question
Why are you using WinZip when being able to zip files is built into Windows? – Rich Bradshaw Apr 20 '10 at 17:49
Ignoring the fact that this is not a good way to keep the code clean when we are both working on it -- and is a nightmare if you want to see what changed, or want to (partly) roll back to a previous version, even if there's only one person working on it...? (I know, you know it's far from ideal, but there are so many free repositories that make life so much easier...) – Arjan Apr 20 '10 at 17:54
up vote 0 down vote accepted

If you're both using WinZip then the files should be the same size (assuming you're using the same compression algorithm).

The only other thing I can think of is that you're sending him everything - source, intermediate files, binaries, images etc. and he's just sending you the code. The chances are that you're including something that can't be compressed very well which is increasing the size of your archive.

Open the two archives up side by side and compare their contents. See if one (yours) contains more files than the other (his).

You don't say what language you're using, but assuming C++ (as an example), just add *.cpp and *.h (or *.hpp, depending on your compiler) to the archive.

share|improve this answer

Set "maximum compressión" or "Best compression" setting in winzip dialog. Or use a better algorythm, this is possible with a compressor like 7zip, using 7zip format. Though the gain often does not worth for the usual stuff. LZMA is a great algorythm for compression, but is not in every software.

Beware: EXEs do compress badly,(check if you're leaving exes in a folder and he's not) there are specialized exe compressors. Again, it all depends on how much do you really need to make lighter packages, in relation with time and effort put in it.

Winzip standard everything, or Winrar, is anyway a good way to ensure the thing arrives with no probs, often people cannot open certain file if compressed in certain manner. I work with a friend of mine tho, and as is just to work together, we use 7zip, with 7z format and highest compression settings.

share|improve this answer

Might also be related to solid-vs-non-solid compression That can makes a substantial difference if there are many small files.

For example, if your friend is using a format like tgz (tar + gzip), (or 7z or winrar programs with solid compression option) he is implicitly first packing all the little files as a single huge file and then compressing all that as a whole. Instead, Winzip compress first each file and afterwards packs them in a single .zip file.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .