Apple Bug Friday! 63
This bug is hdiutil provides no facility to change bzip2 block-size. It was filed on 2007-05-25 at 13:49 PDT.
Summary:
hdiutil, which does allow the user to specify a zlib compression level for UDZO, offers no such option for bzip2/UDBZ.
Steps to Reproduce:
- Invoke hdiutil create, with -format UDBZ -imagekey bzip2-level=9.
Expected Results:
A UDIF disk image compressed with bzip2 is created, with a bzip2 block-size of 900kB.
Actual Results:
A UDIF disk image compressed with bzip2 is created, with a bzip2 block-size of 100kB (according to file(1)).
Regression:
This problem didn’t exist before Tiger, when hdiutil didn’t support bzip2.
Notes:
hdiutil allows the user to specify a compression level for zlib using -imagekey zlib-level=[1-9]. There’s no counterpart option for bzip2 compression (the UDBZ format); hdiutil silently ignores attempts such as “bzip2-level”. The resulting UDBZ image is not much smaller than UDZO with zlib-level=9.
bzlib, bzip2, and pbzip2 all support the specification of block-size; hdiutil should, too.
If rdar://5229421 (inclusion of pbzip2 with Mac OS X) is satisfied, hdiutil can default to a block-size of 900kB, and use a pipe through pbzip2 to make it fast. (If you do that, you should also offer another imagekey for specifying the number of cores to use, to match pbzip2’s -p option.)