Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Why does compressing files suck in OS X?

Why does compressing files suck in OS X?
Thread Tools
Baninated
Join Date: Jun 2000
Location: Cambridge, Chicago, Jerusalem (school/home/heart)
Status: Offline
Reply With Quote
Feb 10, 2005, 04:04 PM
 
I have a large 700mb file. When I try to compress it into either a .sit, .zip or .tgz it only saves me around 10mb. I was hoping to get almost half, perhaps 1/4, but 10?!

So why does compression suck in OS X?
     
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Feb 10, 2005, 04:11 PM
 
Originally posted by bstone:
So why does compression suck in OS X?
It doesn't.
It just depends on what you are compressing.

If it is MP3s, music, videos, DivX, pictures or anything of that kind, there is nothing to compress. You needed to use specialized tools (like Quicktime Pro, Graphics Converter, iTunes etc) to change the files and get a smaller size.

-t
     
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Feb 10, 2005, 04:42 PM
 
The turtle has it. Nothing to do with OS X. If you try compressing a compressed format (MP3, JPG, GIF, DIVX etc), you will save next to nothing. (sometimes make the file size larger).

Try compressing a bunch of uncompressed files like tiff or aiff files on the other hand, and you will see large space savings.
     
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Feb 10, 2005, 04:46 PM
 
Originally posted by PurpleGiant:
Try compressing a bunch of uncompressed files like tiff or aiff files on the other hand, and you will see large space savings.
Are you sure about that ?
I thought TIFF is already compressed to the extend that it's still loseless. I know there are different compression algorithms, so I'm not sure which one is the most efficient. And even with AIFF, I doubt that you get savings from with normal ZIP or SIT compression.

AIFF I would compress as Apple loseless (-> iTunes),
TIFF I'd go with GC.

-t
     
Mac Elite
Join Date: Mar 2000
Location: Allston, MA, USA
Status: Offline
Reply With Quote
Feb 10, 2005, 04:53 PM
 
Why does this thread suck in OS X?

I tried viewing it in Safari, OmniWeb, even FireFox and it sucked in all of them!

So why does this thread suck in OS X?

-- Jason
     
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Feb 10, 2005, 04:56 PM
 
Originally posted by jasong:
-- Jason
It must be you !

-t
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 10, 2005, 05:11 PM
 
Originally posted by turtle777:
I thought TIFF is already compressed to the extend that it's still loseless.
TIFF allows for compressed data, but it doesn't require any compression. This is why there's a "Compression: None" checkbox in Photoshop when saving TIFFs.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Professional Poster
Join Date: Jul 2001
Location: In bits and pieces on Cloud City
Status: Offline
Reply With Quote
Feb 10, 2005, 05:22 PM
 
Originally posted by turtle777:
Are you sure about that ?
I thought TIFF is already compressed to the extend that it's still loseless. I know there are different compression algorithms, so I'm not sure which one is the most efficient. And even with AIFF, I doubt that you get savings from with normal ZIP or SIT compression.

AIFF I would compress as Apple loseless (-> iTunes),
TIFF I'd go with GC.

-t
You can compress tiffs safely and lossless with OSX's ZIP or stuffit. Makes a huge difference.
"Curse my metal body, I wasn't fast enough!"
     
Mac Elite
Join Date: Oct 2000
Location: Amboy Navada, Canadia.
Status: Offline
Reply With Quote
Feb 10, 2005, 10:52 PM
 
Compression does suck on OS X. Not because of the "It didn't compress well" thing mentioned above as that's due to the ability of each format and the data being compressed, but because it's a bit of a free-for-all now.

Aladdin has lost at least my business with their (IMO) shakey ports of their software, the sitx format being another annoyance...I know they needed to do it, but the original .sit design was shortsighted then. IMHO buggy, incompatible, and they charge for it.

Zip was almost non-existant on OS X, until Apple created (used?) a format that wouldn't discard resource forks. It's built into the finder, it's easy, but I hear of spotty compatibility with windows software.

gzip/bzip and tar, you can do it in CLI but that's not easy for everyone, and I'd much rather something simple. I'd make an applescript, but if all of the 3rd party GUI apps I've tried are buggy, I wouldn't trust my own. These formats strip resource forks, so you need mactar or something.

Last I heard, 7Zip (the linux port one...p7zip or something) had just been ported as an alpha see-it-works program to OS X, again it's CLI for now, strips resource forks...and my Mac is too old to do the awesome 7z compression at any respectable speed.

So, which compression to use? Dunno. I like the new disk image format dmg, but you often need to gzip/bzip/7z that for good compression. I use Apple's Zip when I'm lazy.

This insanity brought to you by:
The French CBC, driving antenna users mad since 1937.
     
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Feb 11, 2005, 05:36 AM
 
Originally posted by Disgruntled Head of C-3PO:
You can compress tiffs safely and lossless with OSX's ZIP or stuffit. Makes a huge difference.
I am not entirely sure what you mean - any file level compression will by definition be lossless. File level compression always has to restore to a valid, complete file. Lossy file level compression would, like, suck big time. yukon, I have to disagree. Stuffit is still around if you want it; it's just that the one big task for Stuffit was to decompress downloaded applications, and we use dmgs instead now. Secondly, I have sent Windows users files that were .zipped by the Finder, and I haven't gotten any complaints. I don't really like that the Finder uses zip, because it feels so Windowish to me, but it seems to work well enough. Can you refer us to some reports to the contrary?
(Last edited by Big Mac; Feb 11, 2005 at 03:18 PM. )

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
Professional Poster
Join Date: Jul 2001
Location: New York, NY
Status: Offline
Reply With Quote
Feb 11, 2005, 09:07 AM
 
Originally posted by Big Mac:
encryption ... encryption ... encryption
I think you mean compression compression compression.
cpac
     
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status: Offline
Reply With Quote
Feb 11, 2005, 09:13 AM
 
Originally posted by yukon:
Zip was almost non-existant on OS X, until Apple created (used?) a format that wouldn't discard resource forks. It's built into the finder, it's easy, but I hear of spotty compatibility with windows software.

I have seen the loss of resource forks when I zipped some applications, including my own app, which, umm, unfortunately still has them.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Feb 11, 2005, 10:07 AM
 
Originally posted by bstone:
I have a large 700mb file. When I try to compress it into either a .sit, .zip or .tgz it only saves me around 10mb. I was hoping to get almost half, perhaps 1/4, but 10?!

So why does compression suck in OS X?
What kind of file are you trying to compress? From that file size, I'd wager it's either compressed video or a compressed disk image.

A compression algorithm is a compression algorithm; it doesn't matter what OS you use. Lossless compression works by storing common chunks of data as smaller codes. Lossy compression algorithms, such as those used in most video and audio codecs, actually remove data, but even these usually also run a lossless compression algorithm after this step, to crunch the file size even further.

The way lossless compression works, however, tends to yield a compressed file with very few if any common chunks of data. The end result is that you usually can't derive much benefit from taking a compressed file and trying to compress ir further; in fact, sometimes double-compression can lead to a larger file than single-compression.

As for TIFF files and compression: some TIFFs are compressed, some not. Most open-source programs do not create compressed TIFF files, because the standard compression for TIFF uses the same algorithm as GIF, and the patent on that algorithm only expired recently. If you compress an uncompressed TIFF it will generally work quite well. If you try and compress a compressed TIFF, however, you are unlikely to see much benefit.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Feb 11, 2005, 03:17 PM
 
Originally posted by cpac:
I think you mean compression compression compression.
Oops, haha. Sorry everyone!

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
-Q-
Moderator
Join Date: Jan 2001
Location: Atlanta, GA
Status: Offline
Reply With Quote
Feb 11, 2005, 03:23 PM
 
Originally posted by yukon:
Zip was almost non-existant on OS X, until Apple created (used?) a format that wouldn't discard resource forks. It's built into the finder, it's easy, but I hear of spotty compatibility with windows software.
Really? I haven't heard that at all. Nor have I experienced it going back and forth between work and home with my files. Apple's .zip archives have decompressed nicely for me on any windows machine I've sent them to (primarily 98, 2000 and XP).

And with the advent of compression in OS X, I've done away with stuffit (I keep expander around for the odd file still distributed that way). I've found Apple's archive creator fine for my needs...
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Feb 12, 2005, 09:50 AM
 
gzip/bzip and tar, you can do it in CLI but that's not easy for everyone, and I'd much rather something simple. I'd make an applescript, but if all of the 3rd party GUI apps I've tried are buggy
I've never had a problem with CleanArchiver (http://www.macupdate.com/info.php/id/17207)
     
Mac Elite
Join Date: Feb 2003
Status: Offline
Reply With Quote
Feb 12, 2005, 10:57 AM
 
StuffIt is completely redundant now. I hope Apple don't include Expander in Tiger as that will make people move over to open formats like zip, tar etc.

It would be good to be able to make encrypted zip archives with Finder though.
     
Grizzled Veteran
Join Date: May 1999
Location: Seattle
Status: Offline
Reply With Quote
Feb 12, 2005, 12:17 PM
 
Compressing files is so 80's.

I'll send you a fax all about the big new hard drives you can get cheap now.



But the bottom line as others have pointed out is that some files compress more than others. Dense data files like images and sound tend to offer up little space.

Personally I always use zip now that it is built in to the Finder. Works well for me so far.

bd
1.25GHz PowerBook


i vostri seni sono spettacolari
     
Dedicated MacNNer
Join Date: May 2004
Status: Offline
Reply With Quote
Feb 12, 2005, 12:41 PM
 
Originally posted by yukon:
I like the new disk image format dmg, but you often need to gzip/bzip/7z that for good compression. I use Apple's Zip when I'm lazy.
Use the "Compressed dmg" format from Disk Utility.
In my comparisons, the compression achieved by this format is comparable to bzip2 -9, but has the benefits of being accessible in one step instead of two.
â•­1.5GHz G4 15" PB, 2.0GB RAM, 128MB VRAM, 100GB 7200rpm HD, AEBS, BT kbd
â•°2.0GHz T2500 20" iMac, 1.5GB RAM, 128MB VRAM, 250GB 7200rpm HD

http://www.DogLikeNature.com/
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Feb 12, 2005, 12:43 PM
 
Good point boondoggle. Believe me, I'd buy an external drive if I could, but I'm in overdraft. For now, it's my CDR spindle or bust! My documents folder is often hovering around the 900 meg mark. Compression lets me squeeze it down unto a CDR for backup.

I have another folder full of .psd and .tiff that goes from more than a gig in size to less than a CD with compression. I keep a live backup on CDRW for that one.
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Feb 12, 2005, 12:45 PM
 
Originally posted by Dog Like Nature:
Use the "Compressed dmg" format from Disk Utility.
In my comparisons, the compression achieved by this format is comparable to bzip2 -9, but has the benefits of being accessible in one step instead of two.
How do you make a compressed .dmg in one step from disk utility? Can you drag and drop a folder unto its icon or something?
     
Dedicated MacNNer
Join Date: May 2004
Status: Offline
Reply With Quote
Feb 12, 2005, 02:18 PM
 
Originally posted by darcybaston:
How do you make a compressed .dmg in one step from disk utility? Can you drag and drop a folder unto its icon or something?
Launch Disk Utility, then go to Images -> New -> Image From Folder...
After selecting the folder, choose "Compressed" as the format to create, and you're good to go!
â•­1.5GHz G4 15" PB, 2.0GB RAM, 128MB VRAM, 100GB 7200rpm HD, AEBS, BT kbd
â•°2.0GHz T2500 20" iMac, 1.5GB RAM, 128MB VRAM, 250GB 7200rpm HD

http://www.DogLikeNature.com/
     
Mac Enthusiast
Join Date: Feb 2002
Location: Atlanta
Status: Offline
Reply With Quote
Feb 12, 2005, 03:04 PM
 
Also, one of the main uses for things like .zip is to take say, 10 photos, and .zip them into 1 file for things like archiving and for moving across the internet. It's easier to move 1 file than it is to move 10.
MacBook Pro C2D 2.16GHz 2GB 120GB OSX 10.4.9, Boot Camp 1.2, Vista Home Premium
mac mini 1.42, 60GB 7200rpm, 1GB (sold), dual 2GHz/G5 (sold), Powerbook 15" 1GHz (sold)
dual G4 800MHz (sold), dual G4 450MHz (sold), G4 450MHz (sold), Powerbook Pismo G3 500MHz (sold)
PowerMac 9500 132MHz 601, dual 180MHz 604e, Newer G3 400MHz (in closet)
Powermac 7100 80MHz (sold), Powermac 7100 66MHz (sold)
     
Dedicated MacNNer
Join Date: Jun 2001
Location: The Land of More :(
Status: Offline
Reply With Quote
Feb 12, 2005, 03:06 PM
 
Originally posted by Dog Like Nature:
Launch Disk Utility, then go to Images -> New -> Image From Folder...
After selecting the folder, choose "Compressed" as the format to create, and you're good to go!
That's not exactly one step, which was what darcybaston was probably trying to point out.

Four steps, though it is very easy to do.

"And I will rule you all with an iron fist! You! OBEY THE FIST!" -Invader Zim
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Feb 12, 2005, 04:07 PM
 
Originally posted by Dog Like Nature:
Launch Disk Utility, then go to Images -> New -> Image From Folder...
After selecting the folder, choose "Compressed" as the format to create, and you're good to go!
Wow, is that ever slow. I made a gzip of a folder in 3 times less time than a compressed dmg was done on my machine.

Hey, but, you can mount this image from a CD and extract just the stuff you want right, through drag n drop?
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Feb 12, 2005, 05:22 PM
 
Originally posted by darcybaston:
Hey, but, you can mount this image from a CD and extract just the stuff you want right, through drag n drop?
That's right. Disk Copy has to allocate a given amount of space, format it as HFS+, copy the files into it, and then compress the image. All of this takes time, and so in the end it's slower because it's doing more.

In terms of format, .dmg is actually very similar to the .iso format used for CD images on Windows. The only real difference is that a .dmg is formatted as HFS+ while a .iso is (usually) formatted as ISO-9660.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Mac Elite
Join Date: Oct 2000
Location: Amboy Navada, Canadia.
Status: Offline
Reply With Quote
Feb 12, 2005, 06:46 PM
 
Sorry, I can't give any information on problems with Apple's ZIP compatibility, all I can remember is that some people were having trouble, not sure if it was WinZIP or the Built-into-NT function. I was told in no uncertain terms that Apple's ZIP would protect resource forks, that being the reason for oddly named files in the archives, if that's questionable then perhaps I'll watch that closer....

Stuffit is around, I just don't like their software much anymore . Sorry to say, I find it very buggy and unreliable....I used to recommend Stuffit Expander to just about everyone too, now it often fails on me silently or with cryptic errors. I believe it should be included with OS X though to decompress odd formats Mac users come across, but if Tiger will decompress a whole lot more than ZIP then they can leave it out IMO.

Never used CleanArchiver for tbz/tgz....I tried a whole lot of them, tarmac, droptar2bz, freetar, and a bunch of others....often features simply wouldn't work. But the reason I stopped using them was when at least the three above were silently failing when compressing something, and leaving the temporary file, it wouldn't be hard to delete the original and assume the (unfinished) archive would be decompressable. Just went to the CLI after that, and 7Zip on Windows, it does other formats as well.

DMG has a compression feature of course, and I've found that I could decrease many files by gzipping them afterwards. Just something I noticed. Perhaps it's changed in 10.3, it was like that in 10.2 at least.

to sodamnregistered2, check out "tar", it's a UNIX format that takes many files and turns them into one.
     
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Feb 12, 2005, 07:08 PM
 
If I really want something compressed as best as possible, I'll usually use hfstar, which is a patch to GNUtar which goes in /usr/local/bin or usr/bin if you want it in the path, to bundle the mac files up with resource forks and finder flags and then bzip2 on the tar archive. You can automate this with an AppleScript and it is probably the best way to keep crossplatform (well, the resource forks will always be lost on other platforms) compatibility. bzip2 is available for both Linux and Windows via Cygwin.
weird wabbit
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Feb 12, 2005, 08:33 PM
 
I just found out that you need more than double the size of the data to be compressed available on the destination drive for the creation of a compressed .dmg file. This isn't the case when compressing to gzip or whatever. I have a folder at 1.3gig of data, and 2.2 gigs free. The drive ran out of space during the creation of the .dmg.

Good thing I have a second partition with 6 gigs free.
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Feb 12, 2005, 09:40 PM
 
So I made my first compressed .dmg from a folder. I clicked twice on it to mount it, and after verfication and mounting was done, no icon appeared anywhere in the finder. I can see it mounted in /volumes/ through the command line, but even cmd+shift+G in the finder says /volumes/archivefolder doesn't exist.

Back to gzip after all...*sigh*
     
Mac Elite
Join Date: Oct 2000
Location: Amboy Navada, Canadia.
Status: Offline
Reply With Quote
Feb 13, 2005, 01:23 AM
 
Darcy, many of the 3rd party tools I was using failed exactly for that reason. They used temporary files on a startup disk that was quite small....enough space for a while, then failure.

I knew there was a tar program that delt with resource forks, I called it "mactar" for some reason, HFSTar is it. I tried it once, worked fine, didn't stick with it....installed something called BinJuggler, a contextual menu item which I promptly forgot about.

theolein, watch for 7Zip, it compresses better than BZip2, beating WinRAR 3.1. It worked on OS X for me, alpha at the time, works great on Windows though, awesome when you need to compress for a CD or DVD size limit. It was Windows-Only and reliant on x86, it was open sourced, ports are going throuh.
     
Professional Poster
Join Date: Oct 1999
Location: Always within bluetooth range
Status: Offline
Reply With Quote
Feb 13, 2005, 09:44 AM
 
Originally posted by yukon:

theolein, watch for 7Zip, it compresses better than BZip2, beating WinRAR 3.1. It worked on OS X for me, alpha at the time, works great on Windows though, awesome when you need to compress for a CD or DVD size limit. It was Windows-Only and reliant on x86, it was open sourced, ports are going throuh.
Agreed, p7zip format is the current KING of compression technologies. The tools to use it on OS X can be downloaded from sourceforge, and little GUI front-end called Compress has been released by some folks (not the slickest implementation in the world, but its free and it works). Unfortunately, you have to look in Activity monitor to see when the process "7za" is done as there is no progress bar. Honestly, the compression is fantastic but I rarely use it because I can't count on anyone else being able to open it I I send it to them
     
Dedicated MacNNer
Join Date: Feb 2003
Location: Mt. Ararat, chillin' with Noah in the Ark's broken hull.
Status: Offline
Reply With Quote
Feb 13, 2005, 02:35 PM
 
bstone you are on a roll with dumb threads lately. After getting shot down in Applications about pithHelmet, you continue the trend.

Don't be so abrasive.

All-seeing and all-knowing since 2000 B.C.
     
Mac Elite
Join Date: Oct 2000
Location: Amboy Navada, Canadia.
Status: Offline
Reply With Quote
Feb 13, 2005, 07:17 PM
 
Oracle - SHHH! We're steering it in another direction ;-)
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:12 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2