Compressing files....a noodle-scratcher question!

MoreDents

Limp Gawd
Joined
Mar 9, 2008
Messages
294
I was compressing a folder full of vacation photo's that came up to be about 70 MB

I compressed it in ZIP format as FASTEST and got the completed ZIP file down to around 60 MB.

Now my question is...does this FASTEST compression damage the files? I don't think it does because when I unzipped the ZIP file, the folder was back to 70 MB

SO...since it does not damage the files, who would compress at a regular rate? Who doesn't want a smaller ZIP file to transfer over the internet and on flash drives?!

:D
 
Zip compression is lossless; when the file is decompressed, the original content is restored exactly as it was. Most image formats, especially JPG, are already compressed so you're not going to get much space savings by compressing them with Zip, but sometimes you do get slightly smaller archives.
 
when you do compress it, you get options on how much you want to compress

"Fastest, Fast, Normal, Good, Best"

What's the difference between 'fastest' and 'best?'
 
It would be difficult to put a number to it, but it goes something like this:

Fastest
The compression engine isn't going to try to compress it very much. It's going to store the files in an archive, and you might get some compression out of it -- but then again, you might not.

Normal
The compression engine is going to use it's standard compression method. It's going to be a balance between file size and compression time. You are going to get better compression than using fastest, but it's going to take a bit longer.

Good
The compression engine is going to step it up a notch and really work to compress your files. It's going to get a better compression ration (smaller file sizes), but it's going to take longer to do it.

Best
The compression engine is going to work as hard as it can to make the file as small as it can. This should yield the best compression ratio (smallest file size), but it's going to take quite a but more CPU power to compress the file.



Graphic files are typically compressed. They get compressed in lossy compression which means you'll never get the original picture back. Thats ok, because a high quality picture can be compressed and our eyes may never notice the difference. When you use a lossy compression method, you typically end up with a smaller file size because you don't need to get the original picture back.

Zipfiles, being a lossless compression, need to hold a dictionary if you will. This dictionary tells the compression engine how to get the original file back to the exact state it was in before it was compressed.

This is why we use lossless compression for binary files (like executables). If we loose a bit of picture quality, we can still make out the picture. But if we start dropping bits from a binary file, it won't run properly.

In compression terms, the better the compression, the longer it's going to take to compress. You don't always get better results, as some files just can't be compressed much more than they already are (mp3, jpg, etc). But when you compare the difference on something like a text file, it's night and day difference!
 
Best compression I've ever seen was a .doc file many years ago. It was a manual for some POS (Point Of Sale not Piece Of Shit) software for a client I was assisting. The single page of info included with the Win95-powered cash register just provided an FTP link to download the file.

Upon logging in (this was dialup days, kids, back in 1996 or so) the file I snagged was a Zip file, 565KB in size. I was using a 386SX/16 machine with 4MB of RAM (it's all they had besides the register itself) and after downloading the file I went to extract it with WinZip and wham, it took like 15 minutes to unzip. When I finally realized why I was pretty shocked:

That 565KB Zip file contained just one .doc file and uncompressed to over 25MB in size... the pagefile on that machine was going absolutely insane trying to handle displaying the document and keeping the damned OS (also running Win95 on the 386SX/16) up and running.

Zip is theoretically capable of 98% compression rates with simple text and documents, this happened to be the one single time I've ever actually encountered a file that hit that theoretical maximum. Amazing stuff...
 
Back
Top