Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

LZFSE

From Wikipedia, the free encyclopedia
Loseless compression algorithm
LZFSE
DeveloperApple
Initial release2015
Stable release
lzfse-1.0 / 8 May 2017; 8 years ago (2017-05-08)
Written inC
Operating systemmacOS,iOS,Linux[1]
Available inC
TypeData compression
License3-clause NewBSD License
Repositorylzfse onGitHub

LZFSE (Lempel–Ziv Finite State Entropy) is anopen sourcelossless data compressionalgorithm created byApple Inc. It was released with a simpler algorithm calledLZVN.[2]

Overview

[edit]

The name is an acronym forLempel–Ziv andfinite-state entropy[3] (implementation ofasymmetric numeral systems).LZFSE was introduced by Apple at itsWorldwide Developer Conference 2015. It shipped with that year'siOS 9 andOS X 10.11 releases.

Apple claims that LZFSE compresses with a ratio comparable to that ofzlib (DEFLATE) and decompresses two to three times faster while using fewer resources, therefore offering higherenergy 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 onarm64.[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]

According to the Squash Benchmark, LZFSE is similar in speed tozstd (level 6), but has a slightly worse ratio. LZVN is similar in speed to LZ4 level 4, with a slightly worse ratio as well.[6] 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.[7]

Implementation

[edit]

A referenceClibrary written by Eric Bainville was made available under the3-clause BSD License afterWWDC 2016. It includes an executable to compress and decompress LZFSE streams as well. There are no plans to expose an LZVN API.[1]

Apple's LZFSE implementation uses a simpler algorithm called LZVN when the input is smaller thanLZFSE_ENCODE_LZVN_THRESHOLD (4096 bytes). This is aLZSS-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.[7] 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 legacylzss compression fromHaruhiko Okumura.[8]

Usage

[edit]

AppleFSCompression.framework (AFSC), the mechanism for quasi-transparent compression inHFS Plus andApple File System, supports LZFSE and LZVN since OS X 10.9.

Apple'sDisk Images framework has offered an LZFSE-based encoding calledULFO sinceMac OS X 10.11,[9] accessible viahdiutil(1)[10] and some third-party image utilities.

Apple introduced theApple Archive format and its associated API inmacOS High Sierra in 2017.[11] The extension name is.aar (sincemacOS Big Sur, used to be.yaa). Encryption was introduced inmacOS Monterey, when AA became the defaultArchive Utility format. Three command-line utilities are available in macOS to handle AA files.[12][13] Of third-party programs, Keka is able to use the system APIs to handle AA files, but no independent implementations exist on other systems.[14]

See also

[edit]

References

[edit]
  1. ^abBainville, Eric (2016-06-07)."LZFSE compression library and command line tool". GitHub. Retrieved2016-07-04.
  2. ^Apple Inc."Data Compression - Compression | Apple Developer Documentation".developer.apple.com. Retrieved2017-04-07.
  3. ^abDe Simone, Sergio."Apple Open-Sources its New Compression Algorithm LZFSE".infoq. Retrieved2016-07-07.
  4. ^Apple Inc. (2015-06-12)."Low Energy, High Performance: Compression and Accelerate – WWDC 2015 – Apple Developer Videos".developer.apple.com. Retrieved2017-03-05.pdfArchived 2016-04-18 at theWayback Machine
  5. ^"Compression Benchmark". Retrieved2018-08-10.
  6. ^"Squash Compression Benchmark".GitHub. Squash. Retrieved25 December 2019.
  7. ^ab"lzfse_tunables.h".GitHub. 18 December 2019. Retrieved22 December 2019.
  8. ^Piker-Alpha (4 June 2014)."OS X 10.10 Yosemite DP1 kernel(cache)".Pike's Universum. Retrieved22 December 2019.
  9. ^Tsai, Michael (2015-10-07)."LZFSE Disk Images in El Capitan". Archived fromthe original on 2017-04-09. Retrieved2022-04-15.
  10. ^"hdiutil(1) mojave man page". Retrieved2022-04-15.
  11. ^"Apple Archive".Apple Developer Documentation.
  12. ^"Inside Apple Archive: more than a compression format".The Eclectic Light Company. 10 May 2022.
  13. ^"AA(1): Manipulate Apple Archives".keith.github.io.
  14. ^"AppleArchive support · Issue #829 · aonez/Keka".GitHub.
  15. ^"compression_algorithm".Apple Developer Documentation. Apple Inc. Retrieved2019-08-11.

External links

[edit]
Lossless
type
Entropy
Dictionary
Other
Hybrid
Lossy
type
Transform
Predictive
Audio
Concepts
Codec
parts
Image
Concepts
Methods
Video
Concepts
Codec
parts
Theory
Community
People
Retrieved from "https://en.wikipedia.org/w/index.php?title=LZFSE&oldid=1282071342"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp