A structure for values that represent compression algorithms.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
Choose an algorithm according to the following guidelines:
COMPRESSIONif speed is critical, and you are willing to sacrifice compression ratio to achieve it.
COMPRESSIONif compression ratio is critical, and you are willing to sacrifice speed to achieve it. Note that
COMPRESSIONis an order of magnitude slower for both compression and decompression than other choices.
COMPRESSION is faster than
COMPRESSION, and generally achieves a better compression ratio. However, it is slower than
COMPRESSION and does not compress as well as
COMPRESSION, so you will still want to use
COMPRESSION if speed is critical or
COMPRESSION if compression ratio is critical.