Dmg Files With Lzfse Compression

OS X uses its own standard for disk images in the form of DMG files, which in turn have a variety of uses, mainly designed for containing. LZFSE is Apple’s proprietary compression algorithm, matching the compression ratio of zlib level 5, but with much higher energy efficiency and speed (between 2x and 3x) for both encode and decode operations. .dmg LZFSE — smaller file, fastest A disk image compressed using LZFSE (Lempel–Ziv Finite State Entropy). The files are slightly smaller than zlib-compressed disk images, with encoding that is twice as fast and decoding that is three times as fast. This is DropDMG’s recommended format for general use if your files can require macOS 10.11. 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) from Mac OS X and the New Disk Image Format (NDIF) from Mac OS 9. Lossless data compression library with a compression ratio similar to LZMA but with much faster decompression.

The top-level dmg key contains set of options instructing electron-builder on how it should build DMG.

  • background String - The path to background image (default: build/background.tiff or build/background.png if exists). The resolution of this file determines the resolution of the installer window. If background is not specified, use window.size. Default locations expected background size to be 540x380. See: DMG with Retina background support.
  • backgroundColor String - The background color (accepts css colors). Defaults to #ffffff (white) if no background image.
  • icon String - The path to DMG icon (volume icon), which will be shown when mounted, relative to the build resources or to the project directory. Defaults to the application icon (build/icon.icns).
  • iconSize = 80 Number - The size of all the icons inside the DMG.
  • iconTextSize = 12 Number - The size of all the icon texts inside the DMG.
  • title = ${productName} ${version} String - The title of the produced DMG, which will be shown when mounted (volume name).

    Macro ${productName}, ${version} and ${name} are supported.

  • contents Array<DmgContent> - The content — to customize icon locations. The x and y coordinates refer to the position of the center of the icon (at 1x scale), and do not take the label into account.

    • x Number - The device-independent pixel offset from the left of the window to the center of the icon.
    • y Number - The device-independent pixel offset from the top of the window to the center of the icon.
    • type “link” | “file” | “dir”
    • name String - The name of the file within the DMG. Defaults to basename of path.
    • path String - The path of the file within the DMG.
  • format = UDZO “UDRW” | “UDRO” | “UDCO” | “UDZO” | “UDBZ” | “ULFO” - The disk image format. ULFO (lzfse-compressed image (OS X 10.11+ only)).
  • window - The DMG windows position and size.
    • x = 400 Number - The X position relative to left of the screen.
    • y = 100 Number - The Y position relative to top of the screen.
    • width Number - The width. Defaults to background image width or 540.
    • height Number - The height. Defaults to background image height or 380.
  • internetEnabled = false Boolean - Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).
  • sign = false Boolean - Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.

Inherited from TargetSpecificOptions:

  • artifactName String - The artifact file name template.
  • publish The publish options.

DMG License¶

To add license to DMG, create file license_LANG_CODE.txt in the build resources. Multiple license files in different languages are supported — use lang postfix (e.g. _de, _ru)). For example, create files license_de.txt and license_en.txt in the build resources.If OS language is german, license_de.txt will be displayed. See map of language code to name.

You can also change the default button labels of the DMG by passing a json file named licenseButtons_LANG_CODE.json. The german file would be named: licenseButtons_de.json.The contain file should have the following format:

Dmg
LZFSE
Developer(s)Apple
Initial release2015
Stable release
Repositorylzfse on GitHub
Written inC
Operating systemmacOS, iOS, Linux[1]
Available inC
TypeData compression
License3-clause New BSD License
Dmg

Dmg Files With Lzfse Compression

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 two to three times faster while using fewer resources, therefore offering higher efficiency than zlib. It was aimed for scenarios where decompression speed and rate should be prioritised equally.[3] Part of this 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 mechanism for quasi-transparent compression in HFS Plus and Apple File System, supports LZFSE and LZVN since OS X 10.9.

See also[edit]

  • 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]

Dmg Files With Lzfse Compression Size

  1. ^ abBainville, Eric (2016-06-07). 'LZFSE compression library and command line tool'. GitHub. Retrieved 2016-07-04.CS1 maint: discouraged parameter (link)
  2. ^Apple Inc. 'Data Compression - Compression | Apple Developer Documentation'. developer.apple.com. Retrieved 2017-04-07.
  3. ^ abDe Simone, Sergio. 'Apple Open-Sources its New Compression Algorithm LZFSE'. infoq. Retrieved 2016-07-07.CS1 maint: discouraged parameter (link)
  4. ^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
  5. ^'Compression Benchmark'. Retrieved 2018-08-10.CS1 maint: discouraged parameter (link)
  6. ^ ab'lzfse_tunables.h'. GitHub. 18 December 2019. Retrieved 22 December 2019.CS1 maint: discouraged parameter (link)
  7. ^Piker-Alpha (4 June 2014). 'OS X 10.10 Yosemite DP1 kernel(cache)'. Pike's Universum. Retrieved 22 December 2019.CS1 maint: discouraged parameter (link)
  8. ^'Squash Compression Benchmark'. GitHub. Squash. Retrieved 25 December 2019.CS1 maint: discouraged parameter (link)
  9. ^'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=992130079'