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 > Mac OS X zip files - Any limitations like file sizes, compatibility?

Mac OS X zip files - Any limitations like file sizes, compatibility?
Thread Tools
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Mar 24, 2009, 01:40 PM
 
I have a 11 GB Parallels hard drive OS installation file which I zipped up to 7 GB with OS X, for a backup. Are there any compatibility issues?

Also, I thought that some zip versions had a limitation of 4 GB. Even if there is no such 4 GB limitation in OS X, are there any file size limitations in OS X?

Am I better or worse off dealing with dmg files?
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Mar 24, 2009, 01:44 PM
 
Does that 7 GB zip file actually work? I'd double-check it by extracting and making sure everything's there. I had to read up on the zip format in order to add support for it in Pacifist, and it uses 32-bit integers for all file sizes, so it really shouldn't work for more than 4 GB.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Eug  (op)
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Mar 24, 2009, 02:03 PM
 
Originally Posted by CharlesS View Post
it uses 32-bit integers for all file sizes, so it really shouldn't work for more than 4 GB.
Hmmm... Even in Leopard? I've already started burning it to DVD (dual-layer), but I'll give the file a shot after it's finished recording.

However, maybe I should just scrap it just in case, and use a dmg file. I do know though that there are 64-bit versions of the zip format, and because my zip appeared to work, I just assumed Leopard was using a 64-bit version or whatever.
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Mar 24, 2009, 02:22 PM
 
For normal-sized files, it definitely uses the regular 32-bit version of zip. I suppose it is possible that it could be smart enough to switch to Zip64 if it detects that you're compressing a sufficiently large amount of data. I'll have to try this myself to see what it does.

Regardless, I think a disk image is probably the safest way to go in any case.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Eug  (op)
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Mar 24, 2009, 03:49 PM
 
I took the file to my MacBook, and it unzipped just fine.

Then I tried it on Windows, and the built-in WIndows unzipper says the zip file is corrupted. I also tried FZ Zip, and it just launches (but doesn't actually unzip it) and shuts down immediately. Both programs work fine with a smaller (13 MB) file.

I guess Mac OS X's built-in zipper uses 32-bit for most files, but for über large files (presumably) switches to 64-bit (which is incompatible with most unzippers out there).
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Mar 24, 2009, 03:55 PM
 
Hmm, interesting. I didn't expect them to use Zip64 since, as you say, almost no-one supports it. Now in order to be fully compatible I have to go implement Zip64 in Pacifist. Thanks a lot.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Eug  (op)
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Mar 24, 2009, 04:01 PM
 


P.S. This 11 GB Parallels .hdd file is actually a package. The unzipped file maintained the package structure. When I peeked inside, the package components were intact.
     
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status: Offline
Reply With Quote
Mar 24, 2009, 05:35 PM
 
I have gotten one complaint that a zip file I sent was corrupted, but I cannot tell if that was due to corruption or Mac encoding.

"The natural progress of things is for liberty to yield and government to gain ground." TJ
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Mar 24, 2009, 06:25 PM
 
Update: I've been looking at some large zip files created by the Apple archive utility, and they do not appear to be Zip64 archives, AFAICT. They appear to be regular 32-bit Zip archives, with the higher 32 bits being chopped off of every 64-bit integer - for example, 0x123456789 becomes 0x23456789. To be honest, I have no idea how Apple's utility is unarchiving the files correctly - they're probably doing something like ignoring all the offsets and file sizes and just reading all the data in order, detecting when zipped data shows up and where it ends. From what I'm looking at, it appears these really are corrupt archives, and I wouldn't recommend using them for amounts of data larger than 4 GB.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Eug  (op)
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Mar 24, 2009, 08:00 PM
 
What? Weird. I didn't even know that was possible. I assume your zipped and unzipped >4 GB files worked fine?

Anyways, I guess I'll re-backup this in a dmg just to be safe. Ironically, checking back at my old backups, they're all in dmgs anyway. I previously had just assumed >4 GB zips wouldn't work and didn't even try until this time around. (The only reason I tried this time was because I totally forgot about the size issue until after I had zipped it.)
     
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Mar 24, 2009, 09:46 PM
 
Originally Posted by Eug View Post
What? Weird. I didn't even know that was possible. I assume your zipped and unzipped >4 GB files worked fine?
It's weird all right. I didn't test the files extensively, but they were all there and seemed to have the right sizes.

The thing about Zip archives is that they store the file information twice. At the beginning they have all the compressed files stored in order, preceded by metadata such as their filename, sizes, etc. At the end of the file, there's a directory which contains all the file metadata again, but not the files' actual compressed data, with an offset that says where to find the actual file in the archive. An app like Pacifist that wants to list the contents of the file before compressing it would read the directory at the end, and then when you wanted to extract something, it looks up its offset and pulls out the file from where it sits in the earlier part of the archive. Typically you'd then use the compressed size info to determine how much data following the record constitutes the file data you're trying to extract. So something like what Apple's archiver is doing with large files will completely mess up Pacifist, which won't know where to look anything up because the offsets are wrong, but Apple's archiver is probably ignoring all that and just starting from the beginning and grabbing all the compressed data it sees. Presumably, it must be ignoring the file sizes too, and just analyzing the compressed data itself to figure out where it ends (which I think ZLib is able to do for you, although some other compressors can't). I probably wouldn't rely on this, because if the behavior of Apple's archive utility changes, you won't be able to get anything out of the archive anymore, and it seems most third-party utilities aren't able to do it either.

As it turns out, though, version 3.0 of Info-Zip (available at http://www.info-zip.org) does automatically make proper Zip64 archives if the file size gets over 4 GB, so if Apple ends up upgrading the included version of Info-Zip to 3.0 in Snow Leopard, they might end up getting this for free - so I'm going to preemptively add support for Zip64 to Pacifist anyway. And of course if you're interested in making big zip files, you can download Zip 3.0 and make them at the command line.
(Last edited by CharlesS; Mar 24, 2009 at 10:18 PM. )

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
   
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 01:58 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