Search code examples
macosshellzipcompression

How to properly zip a macos .app file with zip command?


zip -r foo.zip foo.app zips a 12md app into a 12md .zip file, and it becomes a 34mb .app file after unzipping. How to properly zip a .app file with zip command?


Solution

  • Execute command:

    # Basic command: zip [Flags] archiveFileName [inpaths]
    $sudo zip -9 -y -r -q Acc.zip Adobe\ Acrobat\ Reader\ DC.app
    

    Flag descriptions:
    -9: compress better
    -y: store symbolic links as the link instead of the referenced file
    -r: recurse into directories
    -q: quiet operation

    Size of Adobe Acrobat Reader DC.app: 512.5 MB enter image description here

    Size of compressed file Acc.zip: 215.4MBenter image description here

    Decompressed file size of Acc.zip file: 512.5MB enter image description here