SwiftZip Documentation Beta

Overview

macOS Linux

SwiftZip is a Swift wrapper for libzip providing an API to read, create and modify zip archives. Files can be added from data buffers, files, or compressed data copied directly from other zip archives. Changes made without closing the archive can be reverted.

Visit SwiftZip project at GitHub: https://github.com/SwiftZip/SwiftZip.

Note: SwiftZip is currently under development and API may change slightly as the project evolves.

Classes

Zip​Archive

An read-only archive.

Zip​Archive.​Entry​Collection

A collection of read-only entries in the archive.

Zip​Entry

A read-only accessor for an entry in the archive.

Zip​Entry​Reader

A reader for the archive entry data stream.

Zip​Mutable​Archive

An mutable archive.

Zip​Mutable​Archive.​Mutable​Entry​Collection

A collection of mutable entries in the archive.

Zip​Mutable​Entry

A read-write accessor for an entry in the archive.

Zip​Source

A data source.

Structures

Zip​Archive.​Add​File​Flags

A set of flags to be used with ZipArchive.addFile.

Zip​Archive.​FDOpen​Flags

A set of flags to be used with ZipArchive.init(fd:flags:).

Zip​Archive.​Locate​Flags

A set of flags to be used with ZipArchive name-based APIs: locate, stat and open.

Zip​Archive.​Open​Flags

A set of flags to be used with ZipArchive.init.

Zip​Archive.​Version

A version of the archive.

Zip​Entry.​External​Attributes

A platform-specific external attributes of the archive entry.

Zip​Entry.​External​Attributes.​Operating​System

An operating system used to create the archive entry.

Zip​Entry.​Extra​Field​Flags

A lookup flag for extra fields of the archive entry.

Zip​Entry.​Open​Flags

A set of flags to be used with ZipEntry.open.

Zip​Mutable​Archive.​Mutable​Open​Flags

A set of flags to be used with ZipMutableArchive.init.

Zip​Stat

Properties of the archive etry.

Zip​Stat.​Compression​Flags

A compression preference for deflate.

Zip​Stat.​Compression​Method

A compression algorithm.

Zip​Stat.​Encryption​Method

An encryption method.

Zip​Stat.​Valid​Fields

A set of valid property values in the ZipEntry.Stat struct.

Zip​String​Decoding​Strategy

A strategy used to parse string values in the archive

Zip​Whence

A reference point specifier for stream seek methods.

Enumerations

Zip​Error

An error originating from SwiftZip or libzip.

Protocols

Zip​Source​Adapter

A base protocol for all custom sources.

Zip​Source​Readable

A protocol for custom readable sources.

Zip​Source​Seekable

A protocol for custom readable and seekable sources.

Zip​Source​Writable

A protocol for custom writable sources.