First create a directory tree containing compressed files:
mkzftree input_dir compressed_dir
mkzftree will not overwrite an existing directory; you may want to "rm
-rf" the directory tree if you are doing this from a script:
Second, invoke the patched mkisofs with the -z option:
mkisofs -z -R [other options] -o compressed.iso compressed_dir
-z, -transparent-compression
Enable transparent compression of files
-R, -rock Generate Rock Ridge directory information
Note:
-
you *must* enable RockRidge (-R or -r) since this is an extensions to the
RockRidge specification. Without RockRidge, -z will have no effect.
-
for files that you want to be readable under all circumstances (files
involved in booting, or README files), you can simply put them in a separate
tree and not run mkzftree on that tree.
-
mkzftree will not compress files that end up larger when compressed;
-
you can specify -p and a parallelism (e.g. -p4) to allow files (up to the
number specified) to compress in parallel. This might speed things up if
you are not completely I/O bound. The default is -p0.