XZArchive

public final class XZArchive: Archive

Provides unarchive function for XZ archives.

  • Unarchives xz archive stored in archiveData.

    If data passed is not actually a xz archive, XZError will be thrown. If filters other than LZMA2 are used in archive then XZError.WrongFilterID will be thrown.

    If data inside the archive is not actually compressed with LZMA2, LZMAError or LZMA2Error will be thrown.

    Throws

    LZMAError, LZMA2Error or XZError depending on the type of inconsistency in data. It may indicate that either the data is damaged or it might not be compressed with xz or LZMA(2) at all.

    Declaration

    Swift

    public static func unarchive(archiveData data: Data) throws -> Data

    Parameters

    archiveData

    Data compressed with xz.

    Return Value

    Unarchived data.