-
Decompresses
datausing LZMA.Note
It is assumed that the first nine bytes of
datarepresent standard LZMA properties (so called “lc”, “lp” and “pb”), dictionary size, and uncompressed size all encoded with standard encoding scheme of LZMA format.Throws
LZMAErrorif unexpected byte (bit) sequence was encountered indata. It may indicate that either data is damaged or it might not be compressed with LZMA at all.Declaration
Swift
public static func decompress(data: Data) throws -> DataParameters
dataData compressed with LZMA.
Return Value
Decompressed data.
-
Decompresses
datausing LZMA with specified algorithm’sproperties, and, optionally, output’suncompressedSize. IfuncompressedSizeis nil, thendatamust contain finish marker.Note
It is assumed that
databegins immediately with LZMA compressed bytes with no LZMA properties at the beginning.Warning
There is no validation performed for properties of
propertiesargument. This API is intended to be used by advanced users.Throws
LZMAErrorif unexpected byte (bit) sequence was encountered indata. It may indicate that either data is damaged or it might not be compressed with LZMA at all.Declaration
Swift
public static func decompress(data: Data, properties: LZMAProperties, uncompressedSize: Int? = nil) throws -> DataParameters
dataData compressed with LZMA.
propertiesProperties of LZMA (such as lc, lp, etc.)
uncompressedSizeSize of uncompressed data;
nilif it is unknown. In case ofnil, finish marker must be present indata.Return Value
Decompressed data.
View on GitHub
LZMA Class Reference