ZIP on OS X

Trevor DeVore lists at mangomultimedia.com
Tue Dec 14 12:48:50 EST 2004


On Dec 14, 2004, at 9:39 AM, Klaus Major wrote:

> Hi friends,

Hi Klaus.

> i know this has been discussed before, but if i remember right
> with no really satisfying results...
>
> Does anyobody know if we can compress (zip, gz or whatever) an 
> application
> bundle on OS X via "shell", just like the OS does via the context-menu 
> in the finder?
>
> If yes, a little hint to the syntax will be appreciated...
>
> [snip]
> I found and tried "ditto" in the terminal:
>
>  ditto --rsrc weihnachtsbaum.app weihn.cpio
>
> but the resulting file "weihn.cpio" is exactly the same appbundle as 
> the original package,
> even the size is identical... Nothing to see of any kind of 
> compression...?
>
> Tried:
>
>  ditto -c --rsrc weihnachtsbaum.app weihnachten.zip
>
> results in the "weihanchten.zip" file, but is still as big as the 
> original...
>
> What the heck are the correct flags to compress and decompress via 
> "ditto"? :-)

This worked for me.  Took a 60KB file down to 28KB.

ditto -c -k -X --rsrc RevolutionScreenSnapz001.pdf test.zip

-X keeps the archive from descending into directories that have a 
different device ID and -k signifies a PKZip archive as opposed to a 
CPIO archive.


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list