The DMG files normally contain program installation files for Apple system and applications, but they can also be used to hold compressed files. With PowerISO, you can manipulate dmg files on Windows PC. PowerISO can burn dmg file directly to a CD / DVD disc. You needn't convert dmg to iso file before burning. Changes to the volume change the dmg file instead of an actual disk drive. The dmg format includes options such as various volume types (APFS or HFS+), compression options, encryption (password protection) and file spanning (segmenting). Compressed dmg files are generally read-only. Dmg files are often used for Mac software installation.
Developer(s) | Apple |
---|---|
Initial release | 2015 |
Stable release | |
Repository | lzfse on GitHub |
Written in | C |
Operating system | macOS, iOS, Linux[1] |
Available in | C |
Type | Data compression |
License | 3-clause New BSD License |
LZFSE (Lempel–Ziv Finite State Entropy) is an open sourcelossless data compressionalgorithm created by Apple Inc. It was released with a simpler algorithm called LZVN.[2]
Overview[edit]
The name is an acronym for Lempel-Ziv and Finite State Entropy[3] (implementation of asymmetric numeral systems).LZFSE was introduced by Apple at its Worldwide Developer Conference 2015. It shipped with that year's iOS 9 and OS X 10.11 releases.
Apple claims that LZFSE compresses with a ratio comparable to that of zlib (DEFLATE) and decompresses 2–3x faster while using fewer resources, therefore offering higher energy efficiency than zlib. It was aimed for scenarios where decompression speed and rate should be prioritised equally.[3] Part of this energy efficiency was achieved by optimising the algorithm for modern micro-architectures, specifically focusing on arm64.[4] Third-party benchmarking confirms that LZFSE decompresses faster than zlib, but also suggests that many other modern compression algorithms may have more favorable compression algorithm performance characteristics such as density, compression speed and decompression speed by a significant margin.[5]
Apple's LZFSE implementation uses a simpler algorithm called LZVN when the input is smaller than
LZFSE_ENCODE_LZVN_THRESHOLD
(4096 bytes). This is a LZSS-type algorithm without entropy encoding but with three widths of REP (L,M,D) packets. In the open source reference implementation, Apple explains that LZFSE does not perform as well for small sizes, so LZVN is used instead.[6] This algorithm in libfastCompression.a was discovered earlier as the default kernelcache compression method in Mac OS X Yosemite Developer Preview 1 (2014), replacing the legacy lzss
compression from Haruhiko Okumura.[7]According to the Squash Benchmark, LZFSE is similar in speed to ZSTD (level 6), but has a slightly worse ratio. LZVN is similar in speed to LZ4 level 4, with a slightly worse ratio as well.[8] Neither LZFSE nor LZVN is tunable at runtime, although a few constants can be tweaked at compile time for the usual speed-ratio trade-off.[6]
Implementation[edit]
A reference Clibrary written by Eric Bainville was made available under the 3-clause BSD License after WWDC 2016. It includes an executable to compress and decompress LZFSE streams as well. There are no plans to expose an LZVN API.[1]
AppleFSCompression.framework (AFSC), the machanism for quasi-transparent compression in HFS Plus and Apple File System, supports LZFSE and LZVN since OS X 10.9.
See also[edit]
Dmg Files With Lzfse Compression Pads
- Zstandard – another combination of LZ77 and FSE, by Yann Collet, the FSE author
- LZ4 compression algorithm – a fast member of the LZ77 family, also available on Apple platforms[9]
References[edit]
- ^ abBainville, Eric (2016-06-07). 'LZFSE compression library and command line tool'. GitHub. Retrieved 2016-07-04.
- ^Apple Inc. 'Data Compression - Compression | Apple Developer Documentation'. developer.apple.com. Retrieved 2017-04-07.
- ^ abDe Simone, Sergio. 'Apple Open-Sources its New Compression Algorithm LZFSE'. infoq. Retrieved 2016-07-07.
- ^Apple Inc. (2015-06-12). 'Low Energy, High Performance: Compression and Accelerate - WWDC 2015 - Apple Developer Videos'. developer.apple.com. Retrieved 2017-03-05.pdf
- ^'Compression Benchmark'. Retrieved 2018-08-10.
- ^ ab'lzfse_tunables.h'. GitHub. 18 December 2019. Retrieved 22 December 2019.
- ^Piker-Alpha (4 June 2014). 'OS X 10.10 Yosemite DP1 kernel(cache)'. Pike's Universum. Retrieved 22 December 2019.
- ^'Squash Compression Benchmark'. GitHub. Squash. Retrieved 25 December 2019.
- ^'compression_algorithm'. Apple Developer Documentation. Apple Inc. Retrieved 2019-08-11.
External links[edit]
- lzfse on GitHub
- Finite State Entropy by Yann Collet (Cyan4973), the source of the FSE implementation in LZFSE
- Discussion on Encode.su, from which the maintainer Eric Bainville has taken suggestions
Retrieved from 'https://en.wikipedia.org/w/index.php?title=LZFSE&oldid=933361362'
The icon represents an internal hard drive within a generic file icon. | |
Filename extension | .dmg, .smi, .img |
---|---|
Internet media type | application/x-apple-diskimage |
Uniform Type Identifier (UTI) | com.apple.disk-image |
Developed by | Apple Inc. |
Type of format | Disk image |
Apple Disk Image is a disk image format commonly used by the macOS operating system. When opened, an Apple Disk Image is mounted as a volume within the Macintosh Finder.
An Apple Disk Image can be structured according to one of several proprietary disk image formats, including the Universal Disk Image Format (UDIF) and the New Disk Image Format (NDIF). An Apple disk image file's name usually has '.dmg' as its extension.
Features[edit]
Apple Disk Image files are published with a MIME type of application/x-apple-diskimage.
Different file systems can be contained inside these disk images, and there is also support for creating hybrid optical media images that contain multiple file systems.[1] Some of the file systems supported include Hierarchical File System (HFS), HFS Plus, File Allocation Table (FAT), ISO9660 and Universal Disk Format (UDF).[1][2]
Apple Disk Images can be created using utilities bundled with Mac OS X, specifically Disk Copy in Mac OS X v10.2 and earlier and Disk Utility in Mac OS X v10.3 and later. These utilities can also use Apple disk image files as images for burning CDs and DVDs. Disk image files may also be managed via the command line interface using the hdiutil utility.[3]
In Mac OS X v10.2.3, Apple introduced Compressed Disk Images[4] and Internet-Enabled Disk Images for use with the Apple utility Disk Copy, which was later integrated into Disk Utility in 10.3. The Disk Copy application had the ability to display a multi-lingual software license agreement before mounting a disk image. The image will not be mounted unless the user indicates agreement with the license.[5]
An Apple Disk Image allows secure password protection as well as file compression, and hence serves both security and file distribution functions; such a disk image is most commonly used to distribute software over the Internet.
History[edit]
Apple originally created its disk image formats because the resource fork used by Mac applications could not easily be transferred over mixed networks such as those that make up the Internet. Even as the use of resource forks declined with Mac OS X, disk images remained the standard software distribution format. Disk images allow the distributor to control the Finder's presentation of the window, which is commonly used to instruct the user to copy the application to the correct folder.
A previous version of the format, intended only for floppy disk images, is usually referred to as 'Disk Copy 4.2' format, after the version of the Disk Copy utility that was used to handle these images.[1] A similar format that supported compression of floppy disk images is called DART.[1][6]
New Disk Image Format (NDIF) was the previous default disk image format in Mac OS 9,[1] and disk images with this format generally have a .img (not to be confused with raw .img disk image files) or .smi file extension. Files with the .smi extension are actually applications that mount an embedded disk image, thus a 'Self Mounting Image', and are intended only for Mac OS 9 and earlier.[7][2]
Universal Disk Image Format (UDIF) is the native disk image format for Mac OS X. Disk images in this format typically have a .dmg extension.[1]
File format[edit]
Apple has not released any documentation on the format, but attempts to reverse engineer parts of the format have been successful. The encrypted layer was reverse engineered in an implementation called VileFault[8] (a spoonerism of FileVault).
Apple disk image files are essentially raw disk images (i.e. contain block data) with some added metadata, optionally with one or two layers applied that provide compression and encryption. In hdiutil these layers are called CUDIFEncoding and CEncryptedEncoding.[1]
UDIF supports ADC (an old proprietary compression format by Apple), zlib, bzip2 (as of Mac OS X v10.4), and LZFSE (as of Mac OS X v10.11)[9] compression internally.
Trailer[edit]
The trailer can be described using the following C structure.[10] All values are big-endian (PowerPC byte ordering)
Here is an explanation:
Position(in Hex) | Length (in bytes) | Description |
---|---|---|
000 | 4 | Magic bytes ('koly'). |
004 | 4 | File version (current is 4) |
008 | 4 | The length of this header, in bytes. Should be 512. |
00C | 4 | Flags. |
010 | 8 | Unknown. |
018 | 8 | Data fork offset (usually 0, beginning of file) |
020 | 8 | Size of data fork (usually up to the XMLOffset, below) |
028 | 8 | Resource fork offset, if any |
030 | 8 | Resource fork length, if any |
038 | 4 | Segment number. Usually 1, may be 0 |
03C | 4 | Segment count. Usually 1, may be 0 |
040 | 16 | 128-bit GUID identifier of segment |
050 | 4 | Data fork checksum type |
054 | 4 | Data fork checksum size |
058 | 128 | Data fork checksum |
0D8 | 8 | Offset of XML property list in DMG, from beginning |
0E0 | 8 | Length of XML property list |
0E8 | 120 | Reserved bytes |
160 | 4 | Master checksum type |
164 | 4 | Master checksum size |
168 | 128 | Master checksum |
1E8 | 4 | Unknown, commonly 1 |
1EC | 8 | Size of DMG when expanded, in sectors |
1F4 | 12 | Reserved bytes (zeroes) |
Utilities[edit]
There are few options available to extract files or mount the proprietary Apple Disk Image format. Some cross-platform conversion utilities are:
- dmg2img was originally written in Perl; however, the Perl version is no longer maintained, and the project was rewritten in C. Currently, without additional tools, the resulting images may be mounted only under Mac OS X and under Linux (provided hfsplus support has been enabled). UDIF ADC-compressed images have been supported since version 1.5.[11]
- DMGEXtractor is written in Java with GUI, and it supports more advanced features of dmg including AES-128 encrypted images but not UDCO images.[12]
- 7-Zip, including the free cross-platform port of its command-line interface, p7zip.
In Windows, most dmg images can be opened using several other programs such as UltraISO and IsoBuster. MacDrive can also mount simple dmg files as drives under windows, but not sparse disk or encrypted dmgs.[13] A free Apple DMG Disk Image Viewer also exists.[14]
Podcast: We speak with Matt Cutts about leading the United States Digital Services and the role software can play in government. Navigate to Android SDK Folder – Extra – Intel – HardwareAcceleratedExecutionManager and double click on HAXM installer intelhaxm-android.exe (on Mac IntelHAXM6.2.1.dmg) and install it manually. If you do not have latest version of HAXM then you can open sdk manager in android studio and download it. In that case. How to Install iOS Simulator and Android Emulator on Mac for testing and debugging your websites and webapps Introduction. Mobile first! It became true in the end of 2016 when a mobile web-browsing eventually overtook a desktop one. Navigate to Android SDK Folder- Extra- Intel- HardwareAcceleratedExecutionManager and double click on HAXM installer intelhaxm-android.exe (on Mac IntelHAXM6.2.1.dmg) and install it manually. If you do not have latest version of HAXM then you can open sdk manager in android studio and download. Intel haxm_6.2.1.dmg download for windows 7.
In Linux and possibly other Unix flavors, most .dmg files can be burned to CD/DVD using any CD-burner program (using cdrecord directly or a front-end such as K3B or Brasero) or directly mounted to a mountpoint (e.g.
mount -o loop,ro -t hfsplus imagefile.dmg /mnt/mountpoint
).[15][16] darling-dmg is a FUSE module enabling easy DMG file mounting on Linux.[17]See also[edit]
References[edit]
- ^ abcdefg'hdiutil(1) Mac OS X Manual Page'. Archived from the original on 2016-05-14. Retrieved 2016-05-14.
- ^ ab'Mac OS X: Using Disk Copy disk image files'. Archived from the original on 2013-12-19. Retrieved 2013-04-25.
- ^
hdiutil(1)
– Darwin and macOS General Commands Manual - ^'Re: Some apps refuse to launch in 10.2.8! (OT, but very important)'. Archived from the original on 2014-01-17.
- ^'Guides'. Apple. Archived from the original on 2009-03-06. Retrieved 2010-10-27.
- ^'DART 1.5.3: Version Change History'. Archived from the original on 2013-12-19. Retrieved 2013-04-25.
- ^'Software Downloads: Formats and Common Error Messages'. Archived from the original on 2010-12-24. Retrieved 2009-05-06.
- ^'VileFault'. 2006-12-29. Archived from the original on 2007-01-09. Retrieved 2010-10-27.
- ^Michael Tsai (2015-10-07). 'LZFSE Disk Images in El Capitan'. Archived from the original on 2017-04-09. Retrieved 2017-04-09.
- ^'Demystifying the DMG File Format'. Archived from the original on 2013-03-17.
- ^'dmg2img'. Archived from the original on 29 November 2010. Retrieved 2010-10-27.
- ^'DMGExtractor'. Archived from the original on 2011-01-02. Retrieved 2011-01-03.
- ^MacDrive Features / Boot Camp / System Requirements /. 'MacDrive Home page'. Mediafour. Archived from the original on 4 October 2010. Retrieved 2010-10-27.
- ^Olivia Dehaviland (2015-03-03). 'Apple DMG Disk Image Viewer'. DataForensics.org. Archived from the original on 2015-04-02. Retrieved 2015-03-10.
- ^'How To Convert DMG To ISO in Windows, Linux & Mac'. Archived from the original on 2010-03-07.
- ^'Convert DMG To ISO using PowerISO'. Archived from the original on 2009-05-02. Retrieved 2009-02-15.
- ^'darling-dmg'. darling-dmg. Retrieved 29 March 2015.
External links[edit]
- Apple Developer Connection A Quick Look at PackageMaker and Installer
- O'Reilly Mac DevCenter Tip 16-5. Create a Disk Image from a Directory in the Terminal
Dmg Files With Lzfse Compression Pants
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Apple_Disk_Image&oldid=917998972'