Re: Getting better compression
Le 16 févr. 09 à 10:51, Graham Cox a écrit : I have a script that runs during my distribution build that compresses my app using zip. If I use the Finder's Compress command I get almost twice as much compression. Isn't the Finder using zip? If so, what command-line arguments would give me better compression that what I am getting (the script runs 'zip -qr'). If the Finder is using something else, can I use the something else in my script? If so, can somebody point me to some docs on how to do that... man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method (less compression) and -9 indicates the slowest compression method (optimal compression, ignores the suffix list). The default com- pression level is -6. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression
On 16 Feb 2009, at 9:48 pm, Jean-Daniel Dupas wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method (less compression) and -9 indicates the slowest compression method (optimal compression, ignores the suffix list). The default com- pression level is -6. I did look there first thing. I don't see that option or that text. http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/zip.1.html --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression
Le 16 févr. 09 à 11:53, Graham Cox a écrit : On 16 Feb 2009, at 9:48 pm, Jean-Daniel Dupas wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method (less compression) and -9 indicates the slowest compression method (optimal compression, ignores the suffix list). The default com- pression level is -6. I did look there first thing. I don't see that option or that text. http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/zip.1.html It is. Just before the example section. (fourth option from the bottom). Search for Regulate the speed of compression in the page. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression
On 16 Feb 2009, at 9:53 pm, Graham Cox wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method (less compression) and -9 indicates the slowest compression method (optimal compression, ignores the suffix list). The default com- pression level is -6. I did look there first thing. I don't see that option or that text. I tried it anyway - it slightly improves things, but nowhere near the extent that I get with Finder Compress. e.g. original: 9.6M zip script: 6.9M (with -9, with default I get 7.3M) Finder compress 3.4M --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression
http://vafer.org/blog/20060502110034 cheers -- Torsten http://twitter.com/tcurdt ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression
I just looked and it is there. Open that page and search for -6. Matt On 16 Feb 2009, at 11:53, Graham Cox wrote: I did look there first thing. I don't see that option or that text. http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/zip.1.html --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression
On 16 Feb 2009, at 9:55 pm, Jean-Daniel Dupas wrote: It is. Just before the example section. (fourth option from the bottom). D'oh you're right - must have manual blindness ;-) Anyway, it's still pretty feeble compared with Finder... --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression
Le 16 févr. 09 à 11:57, Graham Cox a écrit : On 16 Feb 2009, at 9:53 pm, Graham Cox wrote: man zip ? -# Regulate the speed of compression using the specified digit #, where -0 indicates no compression (store all files), -1 indicates the fastest com- pression method (less compression) and -9 indicates the slowest compression method (optimal compression, ignores the suffix list). The default com- pression level is -6. I did look there first thing. I don't see that option or that text. I tried it anyway - it slightly improves things, but nowhere near the extent that I get with Finder Compress. e.g. original: 9.6M zip script: 6.9M (with -9, with default I get 7.3M) Finder compress 3.4M I think by default zip compresses symlink target instead of the link itself. If you have frameworks in your package, it's possible that zip duplicates you frameworks' headers, executables, and resources. See the -y option: -y Store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link (UNIX only). ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression [SOLVED]
On 16 Feb 2009, at 10:05 pm, Jean-Daniel Dupas wrote: I think by default zip compresses symlink target instead of the link itself. If you have frameworks in your package, it's possible that zip duplicates you frameworks' headers, executables, and resources. See the -y option: -y Store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link (UNIX only). Bingo! That does the trick... thanks very much :) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting better compression [SOLVED]
On Mon, Feb 16, 2009 at 6:14 AM, Graham Cox graham@bigpond.com wrote: On 16 Feb 2009, at 10:05 pm, Jean-Daniel Dupas wrote: I think by default zip compresses symlink target instead of the link itself. If you have frameworks in your package, it's possible that zip duplicates you frameworks' headers, executables, and resources. See the -y option: -y Store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link (UNIX only). Bingo! That does the trick... thanks very much :) Note that if your goal is to replicate what the Finder does, you should use the 'ditto' command instead. From the man page: The command: ditto -c -k --sequesterRsrc --keepParent src_directory archive.zip will create a PKZip archive similarly to the Finder's Compress function- ality. This gives you a zip file with the same structure and semantics as what Finder does, and also nice things like preserving resource forks (as well as, presumably, the symlink thing). Mike ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com