Quality loss when compressing to ZIP, RAR, 7Z?

That’s my question. I’m no techie but I’ve tried to do some reading at Wikipedia. From what I’ve understood, these archive formats are non-destructive, unlike JPEG compression for example. Then what is the key; how can you even choose level of compression? Are the files in an archive in any way affected by choosing “maximum compression”, or is the only - really only - catch that it requires more time to compress/uncompress? So I can safely chose maximum compression for my 7Z-archives, without taking any risks - there will just be some extra CPU time to handle them?

Thanks for any advice,
/LA

There should be no quality loss from choosing maximum compression. Like you suspected, it requires more time (and maybe cpu use) during the operation. I’ve never noticed any deficiencies in quality of picture files as result.

Thanks for the advice Soya, it sounds reasonable. (as for time / cpu time, I more or less put an equal sign there)

Speaking of picture files, it would be interesting to know how much you could compress a non-compressed file (BMP or similar), with non-destructive compression. You know what: I’m going to test it right now!
… …

Result from “normal” compression of a 1077 KB bmp image:
ZIP = 764 KB
7Z = 689 KB

Result from “ultra” compression was almost exactly the same (btw, “normal” and “ultra” apply to the options of 7-Zip File Manager). I couldn’t (with my eyes for a couple of seconds) note any quality loss when decompressing and viewing the BMP picture.

O I C - you mean to view the file while it’s compressed. Now I don’t know, but isn’t it just Windows decompressing it in a temp directory and then opening it? (BTW, I think rar is the most popular/best)

Well, for file storing (the first matter of this thread) I didn’t care for the quality while viewing a file, only that it should be a reversable thing - you compress it, it looks like whatever, then you uncompress it and it’s just as good as from the beginning. Not like making a BMP to JPEG and then back to BMP, this will reduce quality. I just got curious (when you brought up picture file formats) why JPEG is so often used, when one can compress with other formats.

From what I’ve read, RAR is better than ZIP, but the new 7Z is even better - still non-destructive but even better compression ratio than RAR!

Hmm…I don’t know about that. I’ll let you be the rat mouse ;D.

Why jpg so popular over others? Because it consumes less space. I prefer png, which is a lossless form of bmp, but of course it’s bigger than jpg.

True, it consumes less space. But it’s been around since the beginning of time, I wonder why no real competitor has come up. Many things develop (e.g. floppy discs to DVD discs) but hardly the image formats - or am I missing something? PNG - I don’t know how often it is actually used, e.g. on the internet. TIF - I know nothing about TIF. Better take a look on Wikipedia!

/LA

My understanding, if I recall correctly, for the “popularity” of jpg format (given that it is, essentially, outdated) is due in part to MS. Of course, that might be some antiMSitism at work, too. :smiley:

There are also applications (like XnView) that have some ‘lossless transformation’ features.

LM

Oh, didn’t know JPEG came from M$. I even read somewhere (a couple of months ago) that Microsoft intend to kill the JPEG format by replacing it with something else! Don’t remember what format, WMF? WMP?

LA

Yeah, I read that too. Some kind of proprietary format. What I recall was that they’ve basically kept jpg alive (not created it) until they could come up with a proprietary replacement. That could be nothing more than conjecture, rumor, or antiMSitism.

LM

JPEG doesn’t come from M$ …
M$ and others succeeded in getting the jpeg-patent revoked :

As of October 6, 2006, the U.S. patent's 20-year term appears to have expired, and in November 2006, Forgent agreed to abandon enforcement of patent claims against use of the JPEG standard.

I find it very confusing with this “lossy compression” concept .
Shouldn’t it be called “data-reduction” instead ?

Anyway, the reason why you sometimes can save a bit of space if you zip/rar images
has to do with the efficiency of the “compression” used by the image file-format …the more
efficient it is, the less you will save by zipping the file .
If you zip a file in a lossless file-format there will be no loss of quality to the image.
If you do it with a lossy format there might be, but that would be because of the copying,
not the zip-compression .

A decompressed zip/rar file is supposed to be identical bit for bit to the original file
so you should never experience any quality-loss caused by the zip/rar compression …

Just as an experiment you could try and RAR an .avi video and then play the rar with VLC
and see if you notice any difference…

Thanks gordon, that clear things out a little more. And I think 7Z has similar features to ZIP and RAR (but my program, 7-Zip, doesn’t create RAR [but actually creates TAR] archives - it only extracts them).

As for compression level, I have tried both “normal” and “ultra”, but there is a very small difference. So I’ll go with normal, just as well.

/LA

G’day,

There is a better compressor for graphic images - JPEG2000. The best implementation was developed by Lurawave (http://www.lurawave.com) but it isn’t free or widely supported. The almost-lossless compression is remarkable. At 140X (yes 140X!!) it displays the same level of artefact defect as standard JPEG at a setting of 2!!! Truly remarkable, and it is gaining acceptance in niche markets - GIS, hi-res medical imaging etc.

Cheers,
Ewen :slight_smile:

Hi Ewen, that’s really interesting (not the least for me, since my profession is going to be urban design and development = close to GIS). Sounds amazing!!

/LA