Apple has open-sourced its lossless compression algorithm, LZFSE, which was introduced along with iOS 9 and OS X 10.10. What is LZFSE?
It’s a proprietary compression algorithm that, according to Apple (and this explanation is heavy with tech-speak), “matches 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.” ZLIB’s compression level is designed to provide a good balance between compression speed and compression ratio.
LZFSE is only present in iOS and OS X, so it can’t be used when the compressed payload has to be shared to other platforms (Linux, Windows). In all other cases, Apple recommends LZFSE as a replacement for ZLIB.