NSData.CompressionAlgorithm
An algorithm that indicates how to compress or decompress data.
Declaration
enum CompressionAlgorithmOverview
Choose an algorithm that best suits the needs of your app:
NSData.CompressionAlgorithm.lzfse — The algorithm offers faster speed and generally achieves better compression than NSData.CompressionAlgorithm.zlib. However, it is slower than NSData.CompressionAlgorithm.lz4 and doesn’t compress as well as NSData.CompressionAlgorithm.lzma.
NSData.CompressionAlgorithm.zlib — Use this algorithm if your app requires interoperability with non-Apple devices. For example, if you are transferering data to another device where it needs to be compressed or decompressed.
NSData.CompressionAlgorithm.lz4 — Use this algorithm if speed is critical, and you’re willing to sacrifice compression ratio to achieve it.
NSData.CompressionAlgorithm.lzma — Use this algorithm if compression ratio is critical, and you’re willing to sacrifice speed to achieve it. It is an order of magnitude slower for both compression and decompression than other choices.
Topics
Algorithms
NSData.CompressionAlgorithm.lz4NSData.CompressionAlgorithm.lzfseNSData.CompressionAlgorithm.lzmaNSData.CompressionAlgorithm.zlib