Let's say that I have three files with the following sizes:
FileA: 15468bytes
FileB: 3874235bytes
FileC: 10452326bytes
and I want to create a UDIF, GPTSPUD, HFS+ DMG with hdiutil which will exactly the size needed to hold these files. I can, of course, tell hdiutil to create a dmg of the size 14342029 bytes, but the dmg will have < 14342029 bytes in free space available due to the number of bytes needed to support the file system.
Is there a known way to calculate how large to make the DMG so it will hold the files?
p.s. In the 'real' case, there are thousands of files of various sizes.
p.s.s. I am aware of various issues that files actual use X number of blocks on a disk and that a block is a fixed size.