Functions
The following functions are available globally.
-
Compresses the given data using the specified compression method.
Throws
An error if the compression process fails.Declaration
Swift
public func compressData(_ data: Data, method: CompressionMethod) throws -> DataParameters
dataThe data to be compressed.
methodThe compression method to use.
Return Value
The compressed data.
-
Decompresses the given data using the specified compression method.
Throws
An error if the decompression process fails.Declaration
Swift
public func decompressData(_ data: Data, method: CompressionMethod) throws -> DataParameters
dataThe compressed data to be decompressed.
methodThe compression method used to compress the data.
Return Value
The decompressed data.
View on GitHub
Functions Reference