There are a lots of question teaching how to create a DMG file from Linux. But none of them is clear about how to add compression to it.
I usually create a DMG package to redistribute to MacOS, but I would like to add compression as Apple specifies.
Did anyone have a chance to try a tool that supports compression during DMG packing?
Similar questions without compression:
Windows and Linux share the ability to open ISO files, which are similar to DMG files. Though DMG files are commonly associated with Apple's operating system, Mac, they can be opened in Linux with a few simple steps.
What are DMG image files? Simply put, it's a kind of image file. But not an image like a jpeg is an image. DMG is Apple's proprietary disk image format, native to Mac OS X. There are actually a whole bunch of different types, format and options within this format.
Just use 7z x . In the case of for example Sublime text, 7z x "Sublime Text 2.0. 2. dmg" will be enough to extract all the files.
It depends. Here is a good analysis of the .dmg format. From that document, the compression is specified for each block chunk:
Table: DMG blxx types
Type Scheme Meaning
0x00000000 --- Zero-Fill
0x00000001 UDRW/UDRO RAW or NULL compression (uncompressed)
0x00000002 --- Ignored/unknown
0x80000004 UDCO Apple Data Compression (ADC)
0x80000005 UDZO zLib data compression
0x80000006 UDBZ bz2lib data compression
0x7ffffffe --- No blocks - Comment: +beg and +end
0xffffffff --- No blocks - Identifies last blxx entry
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With