Archive/ZIP

Discussion in 'Mac Basics and Help' started by iGary, Feb 6, 2006.

  1. iGary Guest

    iGary

    Joined:
    May 26, 2004
    Location:
    Randy's House
    #1
    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*
     
  2. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #2
    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.
     
  3. iGary thread starter Guest

    iGary

    Joined:
    May 26, 2004
    Location:
    Randy's House
    #3
    8 tiff files.
     
  4. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #4
    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.
     
  5. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #5
    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.
     
  6. iGary thread starter Guest

    iGary

    Joined:
    May 26, 2004
    Location:
    Randy's House
    #6
    No compression was used on the tiff files at all. Zero.
     
  7. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #7
    That's odd... :confused:

    What did you use to compress them? Finder's built-in Create Archive?
     
  8. iGary thread starter Guest

    iGary

    Joined:
    May 26, 2004
    Location:
    Randy's House
    #8
    Yep, sure did.
     
  9. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #9
    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.
     
  10. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #10
    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
     

Share This Page