compression_algorithm
A structure for values that represent compression algorithms.
Declaration
struct compression_algorithmOverview
Choose an algorithm according to the following guidelines:
If speed and compression ratio are important, use COMPRESSION_LZMESH.
If you require interoperability with non-Apple devices, use COMPRESSION_ZLIB.
If speed is critical, and you’re willing to sacrifice compression ratio to achieve it, use COMPRESSION_LZ4.
If compression ratio is critical, and you can sacrifice speed to achieve it, use COMPRESSION_LZRAVEN. Note that COMPRESSION_LZRAVEN is an order of magnitude slower for both compression and decompression than other choices.
COMPRESSION_LZMESH is faster than COMPRESSION_ZLIB and generally achieves a better compression ratio. However, it’s slower than COMPRESSION_LZ4 and doesn’t compress as well as COMPRESSION_LZRAVEN.
COMPRESSION_LZBITMAP provides a compression-ratio that’s between COMPRESSION_LZ4 and COMPRESSION_LZMESH. When compression ratio and performance are equally important, use COMPRESSION_LZMESH to favor compression ratio and COMPRESSION_LZBITMAP to favor performance.
Topics
Algorithm Constants
COMPRESSION_LZFSECOMPRESSION_LZ4COMPRESSION_LZ4_RAWCOMPRESSION_LZMACOMPRESSION_ZLIBCOMPRESSION_BROTLICOMPRESSION_LZBITMAPCOMPRESSION_LZMESHCOMPRESSION_LZRAVEN