Why are the .zip files of compressed .jpegs about the same size?

I am a new user of Linux OS's and I am trying Ubuntu 12.10 right in this days. The overall impression is quite positive, but there are some features that make it still complicated for use from most would-be users and in certain specific situations.

So, today I had to compress a couple of important .jpeg images into .zip files, to send them through Thunderbird to a Windows-using bureau (at least as I guess), and the outcome of the compression (simple way: right click-> compress-> .zip and same folder without password) were files of the very same size! :-(

I tried removing the .jpeg extension, I tried with formats other than .zip (although not sure they would be successfully opened from the recipient), I downloaded the "7zip" utility, I spent a while over all of this trying random things...not a different outcome than same-size files.

So, should I not be willing to use the command lines, how can I quickly compress these files or folders into .zip (not interested in other extensions at the moment) in case the simple procedure above does not work?

Sorry that you may find it a banal question, but I think these are the little hassles that prevent Unix-like OS's from becoming really widespread. Thank you for your help!


If the files were exactly the same size then something strange is going on. However, JPEG files will not compress much, if at all, with any typical archive software. It is expected that a 100kB JPEG file will be 99kB or larger when zipped.


Last step in JPEG compression is entropy coding, which is in essence very similar to what ZIP algorithm do:

  • identify sub-strings that are more common and;
  • give them shorter coded sequences;
  • less common sub-strings will be mapped to longer sequences.

The length to use is computed based on how likely it is to see the substring in the complete file. The result is that in the coded file (JPEG or .ZIP), all substrings of size s now have roughly equivalent chance of occuring. As a result, both .ZIP and JPEG files will compress very poorly through an additional pass of entropy coding.