madler / pigz

A parallel implementation of gzip for modern multi-processor, multi-core machines.
http://zlib.net/pigz/
2.65k stars 175 forks source link

How can I compress a directory directly without tar #78

Closed hangreenyue closed 4 years ago

hangreenyue commented 4 years ago

just like 'zip' command,Open the zip file in Windows and you'll see a folder directly,please

neurolabusc commented 4 years ago

You can't - the gz format compresses a single file, it can not be applied to multiple files/folders. As you note, you can pack multiple files/folders into a single .tar archive. The tar does not compress files/folders, it just concatenates them. You can subsequently compress the tar file to gz format.

hangreenyue commented 4 years ago

You can't - the gz format compresses a single file, it can not be applied to multiple files/folders. As you note, you can pack multiple files/folders into a single .tar archive. The tar does not compress files/folders, it just concatenates them. You can subsequently compress the tar file to gz format. do you know ipa file?Apple installation package is to use zip to compress a folder. Can I use pigz to compress Apple installation package?

neurolabusc commented 4 years ago

Most Apple graphical executables are distributed as a folder with the extension ".app". For example, on the Mac my MRIcroGL software is MRIcroGL.app with many files inside this folder (e.g. MRIcroGL.app/Contents/MacOS/MRIcroGL, MRIcroGL.app/Resources/dcm2niix, etc.). You can see that this is a folder not a single file by clicking on an application in the finder and choosing the "Show Package Contents" option. Since Apple .app folders contain multiple files, you can not compress them directly to .gz. You would need to archive as a .tar and next generate a .gz file.

hangreenyue commented 4 years ago

Most Apple graphical executables are distributed as a folder with the extension ".app". For example, on the Mac my MRIcroGL software is MRIcroGL.app with many files inside this folder (e.g. MRIcroGL.app/Contents/MacOS/MRIcroGL, MRIcroGL.app/Resources/dcm2niix, etc.). You can see that this is a folder not a single file by clicking on an application in the finder and choosing the "Show Package Contents" option. Since Apple .app folders contain multiple files, you can not compress them directly to .gz. You would need to archive as a .tar and next generate a .gz file.

but apple phone can install .gz file?