Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iGary

Guest
Original poster
May 26, 2004
19,580
7
Randy's House
OK, so I have to zip something into an archive file, which I have done - whay is it not any smaller then the original file? :confused:

*feeling stupid*
 
What kind of file was the original? If it's a format that does compression on its own, zip won't help much, and in pathological cases can even result in a larger file.
 
iMeowbot said:
What kind of file was the original? If it's a format that does compression on its own, zip won't help much, and in pathological cases can even result in a larger file.

8 tiff files.
 
Adobe-style TIFFs normally use a compression algorithm called deflate, which is exactly the same one zip uses. Ending up with the same size would be normal.
 
Was the tiff files already compressed?

Many lossless compression algorithms will just add a bit when they encounter files they are not able to compress.

Here's the explanation from gzip.org:

Compression is always performed, even if the compressed file is
slightly larger than the original. The worst case expansion is
a few bytes for the gzip file header, plus 5 bytes every 32K block,
or an expansion ratio of 0.015% for large files. Note that the actual
number of used disk blocks almost never increases.
 
Mitthrawnuruodo said:
Was the tiff files already compressed?

Many lossless compression algorithms will just add a bit when they encounter files they are not able to compress.

Here's the explanation from gzip.org:

Compression is always performed, even if the compressed file is
slightly larger than the original. The worst case expansion is
a few bytes for the gzip file header, plus 5 bytes every 32K block,
or an expansion ratio of 0.015% for large files. Note that the actual
number of used disk blocks almost never increases.

No compression was used on the tiff files at all. Zero.
 
Try this:

Open up Terminal.

Type in
Code:
zip -9 pic.zip
with a space after the "pic.zip".

Find your file in Finder and drag it to the Terminal window.

Hit "return".

You should now have a much smaller file, named "pic.zip", in your home folder.

Of course, use any file name you like, and you can add a directory path so it doesn't end up in your home folder.

You can also just type in
Code:
zip -9
with a space after the "-9", then drag the file onto Terminal, back up to delete the space it adds after the file name and append ".zip " [note the space] then drag the same file over again, so your Terminal line woould look something like this:

Code:
zip -9 /Users/iGary/Photos/MyBigToe.tiff.zip /Users/iGary/Photos/MyBigToe.tiff

which will add the zip file in the same place as the original TIFF file.

The "-9" means to compress it as much as possible.
 
iGary said:
Yep, sure did.
Hmmm... I don't have a good explanation for you. I have had some trouble with the built-in compression earlier (and used Terminal, in stead) but some simple tests now compressed some small but uncompressed tiff files in half when I used the built-in Create Archive in Finder, and I only saved a few bits by making a zipped tar in Terminal... :confused:

There is the chance that the images are so complex that the zip algorithm cannot find redundant bits to get rid of, but for 8 images...???

BTW, nice stache... :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.