SevenZipContainer

public class SevenZipContainer: Container

Provides open functions for 7-Zip containers.

  • Processes 7-Zip container and returns an array of ContainerEntry (which are actually SevenZipEntry).

    Important

    The order of entries is defined by 7-Zip container and, particularly, by the creator of a given 7-Zip container. It is likely that directories will be encountered earlier than files stored in those directories, but one SHOULD NOT rely on any particular order.

    Throws

    SevenZipError or any other error associated with compression type, depending on the type of the problem. It may indicate that either container is damaged or it might not be 7-Zip container at all.

    Declaration

    Swift

    public static func open(container data: Data) throws -> [ContainerEntry]

    Parameters

    container

    7-Zip container’s data.

    Return Value

    Array of SevenZipEntry as an array of ContainerEntry.

  • Processes ZIP container and returns an array of SevenZipEntryInfo, which contain various information about container’s entry. This is performed without decompressing entries’ data.

    Important

    The order of entries is defined by 7-Zip container and, particularly, by the creator of a given 7-Zip container. It is likely that directories will be encountered earlier than files stored in those directories, but one SHOULD NOT rely on any particular order.

    Throws

    SevenZipError or any other error associated with compression type, depending on the type of the problem. It may indicate that either container is damaged or it might not be 7-Zip container at all.

    Declaration

    Swift

    public static func info(container data: Data) throws -> [SevenZipEntryInfo]

    Parameters

    container

    7-Zip container’s data.

    Return Value

    Array of SevenZipEntryInfo.