Hacker News new | past | comments | ask | show | jobs | submit login
Data Compression – LZFSE (developer.apple.com)
9 points by tambourine_man on June 10, 2015 | hide | past | favorite | 5 comments



I think this algorihm is a variant of ZSTD.


HTTP Error 403/Forbidden for me. Could anyone who managed to look at this page tell what it's about?


This is a new iOS (and possibly Mac?) library provided by Apple.

""" The libcompression library provides an API for two styles of data compression:

Block compression, where all of the input data is compressed or decompressed by one call to the compression or decompression function.

Streaming compression, where the compression or decompression function is called repeatedly to compress or decompress data from a source buffer to a destination buffer. Between calls, processed data is moved out of the destination buffer and new data is loaded into the source buffer.

Choosing a Compression Algorithm Apple provides four algorithms, each of which is believed to be the best choice in some set of circumstances.

Three commonly-known encoders are implemented: LZ4, ZLIB level 5, and LZMA level 6. In addition, we provide an encoder for Apple’s proprietary algorithm, LZFSE.

Choose an encoder according to the following guidelines:

Use LZ4 if speed is critical, and you are willing to sacrifice compression ratio to achieve it.

Use LZMA if compression ratio is critical, and you are willing to sacrifice speed to achieve it. Note that LZMA is an order of magnitude slower for both compression and decompression than other choices.

Otherwise, if speed and compression are more or less equally important, use either ZLIB or LZFSE. The choice depends on whether you require interoperability with non-Apple devices.

If you do require interoperability with non-Apple devices, use ZLIB. If you do not, use LZFSE.

LZFSE is an Apple-developed algorithm that is faster than ZLIB, and generally achieves a better compression ratio. However, it is slower than LZ4 and does not compress as well as LZMA, so you will still want to use LZ4 if speed is critical or LZMA if compression ratio is critical. """


Are there any technical details anywhere? Papers? Patent applications? ...


"LZFSE" most likely refers to a Lempel-Ziv modeling phase that converts the input bytes into a series of either literal or copy instructions, followed by a Finite-State-Entropy encoding scheme which "provides the same level of performance as [an] Arithmetic coder, but only requires additions, masks, and shifts".

Here's some explanation of FSE: http://fastcompression.blogspot.com.au/2013/12/finite-state-...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: