---
product: Chilkat
product_version: 11.7.0
language: objc
language_label: Objective-C
class: Zip
class_name: CkoZip
license: bundle
deprecated: false
reference_html: https://www.chilkatsoft.com/refdoc/objcCkoZipRef.html
---
# Chilkat Zip — Objective-C — v11.7.0

> Chilkat 11.7.0 · language=objc · class=Zip (CkoZip)
> Other versions: replace `11.7.0` in this URL. Other languages: `https://www.chilkatsoft.com/ai-docs/v/11.7.0/<lang>/classes/Zip.md`.
> Language-wide rules (install, unlock, error model, strings/bytes): `https://www.chilkatsoft.com/ai-docs/v/11.7.0/objc/guide.md`.

## Purpose

**Create, read, modify, encrypt, and extract ZIP archives.**

`Chilkat.Zip` provides a comprehensive API for working with ZIP archives from files, memory, `BinData`, embedded resources, and Windows self-extracting EXEs. It can create new archives, open existing ZIPs, add files or in-memory data, inspect entries, extract selectively, and write the final archive to disk or memory.

**Create ZIP archives**

Add files, directories, strings, byte arrays, `BinData`, and `StringBuilder` content.

**Open ZIPs from many sources**

Open archives from disk, memory, `BinData`, embedded Windows resources, or Chilkat-created self-extracting EXEs.

**Control stored paths**

Use options such as `AppendFromDir`, `DiscardPaths`, `PathPrefix`, and `saveExtraPath`.

**Extract selectively**

Extract all files, matching entries, newer files, or flatten all output into a single directory.

**Encryption support**

Work with WinZip-compatible AES encryption and legacy Zip 2.0 password protection.

**Large archive support**

ZIP64 is used automatically when older ZIP limits are exceeded.

**Important:** Many methods update the in-memory ZIP object first. The archive is not written until a method such as `WriteZip`, `WriteZipAndClose`, `WriteBd`, or `WriteToMemory` is called.

For an extended overview, see [Zip Class Overview](https://www.chilkatsoft.com/zip_class_overview.asp).

## Object creation, unlocking and error handling

**Object Creation**

```objectivec
CkoZip *obj = [[CkoZip alloc] init];
```

Call `Global.UnlockBundle` once at the start of the program, before using this or any other Chilkat class. Any string unlocks a fully functional 30-day trial; a purchased unlock code is used in production. See `guide.md` for the exact code in Objective-C.

How failure is reported depends on the method's return type and is stated in the note under each method below. In every case the diagnostic text is in the `LastErrorText` property of the object whose method was called.

## Members common to every Chilkat class

Documented once per language in `common-members.md`; listed here so this page is self-contained.

| Property | Signature | Access | Meaning |
|---|---|---|---|
| `DebugLogFilePath` | `@property (nonatomic, copy) NSString *DebugLogFilePath;` | read/write | If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. |
| `LastErrorHtml` | `@property (nonatomic, readonly, copy) NSString *LastErrorHtml;` | read-only | Provides HTML-formatted information about the last called method or property. |
| `LastErrorText` | `@property (nonatomic, readonly, copy) NSString *LastErrorText;` | read-only | Provides plain text information about the last called method or property. |
| `LastErrorXml` | `@property (nonatomic, readonly, copy) NSString *LastErrorXml;` | read-only | Provides XML-formatted information about the last called method or property. |
| `LastMethodSuccess` | `@property (nonatomic) BOOL LastMethodSuccess;` | read/write | Indicates the success or failure of the most recent method call: `YES` means success, `NO` means failure. |
| `VerboseLogging` | `@property (nonatomic) BOOL VerboseLogging;` | read/write | If set to `YES`, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. |
| `Version` | `@property (nonatomic, readonly, copy) NSString *Version;` | read-only | Version of the component/library, such as "10.1.0" |

## Member index

| Member | Kind | Signature |
|---|---|---|
| `AbortCurrent` | property, read/write | `@property (nonatomic) BOOL AbortCurrent;` |
| `AppendFromDir` | property, read/write | `@property (nonatomic, copy) NSString *AppendFromDir;` |
| `CaseSensitive` | property, read/write | `@property (nonatomic) BOOL CaseSensitive;` |
| `ClearArchiveAttribute` | property, read/write | `@property (nonatomic) BOOL ClearArchiveAttribute;` |
| `ClearReadOnlyAttr` | property, read/write | `@property (nonatomic) BOOL ClearReadOnlyAttr;` |
| `Comment` | property, read/write | `@property (nonatomic, copy) NSString *Comment;` |
| `DecryptPassword` | property, read/write | `@property (nonatomic, copy) NSString *DecryptPassword;` |
| `DiscardPaths` | property, read/write | `@property (nonatomic) BOOL DiscardPaths;` |
| `Encryption` | property, read/write | `@property (nonatomic, copy) NSNumber *Encryption;` |
| `EncryptKeyLength` | property, read/write | `@property (nonatomic, copy) NSNumber *EncryptKeyLength;` |
| `EncryptPassword` | property, read/write | `@property (nonatomic, copy) NSString *EncryptPassword;` |
| `FileCount` | property, read-only | `@property (nonatomic, readonly, copy) NSNumber *FileCount;` |
| `FileName` | property, read/write | `@property (nonatomic, copy) NSString *FileName;` |
| `HasZipFormatErrors` | property, read-only | `@property (nonatomic, readonly) BOOL HasZipFormatErrors;` |
| `HeartbeatMs` | property, read/write | `@property (nonatomic, copy) NSNumber *HeartbeatMs;` |
| `IgnoreAccessDenied` | property, read/write | `@property (nonatomic) BOOL IgnoreAccessDenied;` |
| `MaxDate` | property, read/write | `@property (nonatomic, copy) NSString *MaxDate;` |
| `MaxUncompressSize` | property, read/write | `@property (nonatomic, copy) NSNumber *MaxUncompressSize;` |
| `MinDate` | property, read/write | `@property (nonatomic, copy) NSString *MinDate;` |
| `NumEntries` | property, read-only | `@property (nonatomic, readonly, copy) NSNumber *NumEntries;` |
| `OemCodePage` | property, read/write | `@property (nonatomic, copy) NSNumber *OemCodePage;` |
| `OverwriteExisting` | property, read/write | `@property (nonatomic) BOOL OverwriteExisting;` |
| `PasswordProtect` | property, read/write | `@property (nonatomic) BOOL PasswordProtect;` |
| `PathPrefix` | property, read/write | `@property (nonatomic, copy) NSString *PathPrefix;` |
| `PercentDoneScale` | property, read/write | `@property (nonatomic, copy) NSNumber *PercentDoneScale;` |
| `PwdProtCharset` | property, read/write | `@property (nonatomic, copy) NSString *PwdProtCharset;` |
| `TempDir` | property, read/write | `@property (nonatomic, copy) NSString *TempDir;` |
| `UncommonOptions` | property, read/write | `@property (nonatomic, copy) NSString *UncommonOptions;` |
| `Zipx` | property, read/write | `@property (nonatomic) BOOL Zipx;` |
| `ZipxDefaultAlg` | property, read/write | `@property (nonatomic, copy) NSString *ZipxDefaultAlg;` |
| `AddBd` | method | `- (BOOL)AddBd:(NSString *)pathInZip     bd:(CkoBinData *)bd;` |
| `AddEmpty` | method | `- (BOOL)AddEmpty:(BOOL)isDir     pathInZip:(NSString *)pathInZip;` |
| `AddEncoded` | method | `- (BOOL)AddEncoded:(NSString *)pathInZip     encoding:(NSString *)encoding     data:(NSString *)data;` |
| `AddFile` | method | `- (BOOL)AddFile:(NSString *)localPath     saveExtraPath:(BOOL)saveExtraPath;` |
| `AddNoCompressExtension` | method | `- (void)AddNoCompressExtension:(NSString *)fileExtension;` |
| `AddSb` | method | `- (BOOL)AddSb:(NSString *)pathInZip     sb:(CkoStringBuilder *)sb     charset:(NSString *)charset;` |
| `AddString` | method | `- (BOOL)AddString:(NSString *)pathInZip     content:(NSString *)content     charset:(NSString *)charset;` |
| `AppendFiles` | method | `- (BOOL)AppendFiles:(NSString *)filePattern     recurse:(BOOL)recurse;` |
| `AppendFilesEx` | method | `- (BOOL)AppendFilesEx:(NSString *)filePattern     recurse:(BOOL)recurse     saveExtraPath:(BOOL)saveExtraPath     archiveOnly:(BOOL)archiveOnly     includeHidden:(BOOL)includeHidden     includeSystem:(BOOL)includeSystem;` |
| `AppendZip` | method | `- (BOOL)AppendZip:(NSString *)zipPath;` |
| `CloseZip` | method | `- (void)CloseZip;` |
| `DeleteEntry` | method | `- (BOOL)DeleteEntry:(CkoZipEntry *)entry;` |
| `EntryAt` | method | `- (BOOL)EntryAt:(NSNumber *)index     entry:(CkoZipEntry *)entry;` |
| `EntryById` | method | `- (BOOL)EntryById:(NSNumber *)id     entry:(CkoZipEntry *)entry;` |
| `EntryMatching` | method | `- (BOOL)EntryMatching:(NSString *)pattern     entry:(CkoZipEntry *)entry;` |
| `EntryOf` | method | `- (BOOL)EntryOf:(NSString *)pathInZip     entry:(CkoZipEntry *)entry;` |
| `ExcludeDir` | method | `- (void)ExcludeDir:(NSString *)dirName;` |
| `GetDirectoryAsXML` | method | `- (NSString *)GetDirectoryAsXML;` |
| `GetMaxUncompressedSize` | method | `- (NSString *)GetMaxUncompressedSize;` |
| `IsNoCompressExtension` | method | `- (BOOL)IsNoCompressExtension:(NSString *)fileExtension;` |
| `IsPasswordProtected` | method | `- (BOOL)IsPasswordProtected:(NSString *)zipPath;` |
| `LoadTaskCaller` | method | `- (BOOL)LoadTaskCaller:(CkoTask *)task;` |
| `NewZip` | method | `- (BOOL)NewZip:(NSString *)zipPath;` |
| `OpenBd` | method | `- (BOOL)OpenBd:(CkoBinData *)binData;` |
| `OpenFromByteData` | method | `- (BOOL)OpenFromByteData:(NSData *)byteData;` |
| `OpenFromMemory` | method | `- (BOOL)OpenFromMemory:(NSData *)inData;` |
| `OpenZip` | method | `- (BOOL)OpenZip:(NSString *)zipPath;` |
| `QuickAppend` | method | `- (BOOL)QuickAppend:(NSString *)zipPath;` |
| `RemoveNoCompressExtension` | method | `- (void)RemoveNoCompressExtension:(NSString *)fileExtension;` |
| `SetCompressionLevel` | method | `- (void)SetCompressionLevel:(NSNumber *)level;` |
| `SetExclusions` | method | `- (void)SetExclusions:(CkoStringArray *)excludePatterns;` |
| `Unzip` | method | `- (NSNumber *)Unzip:(NSString *)dirPath;` |
| `UnzipInto` | method | `- (NSNumber *)UnzipInto:(NSString *)dirPath;` |
| `UnzipMatching` | method | `- (NSNumber *)UnzipMatching:(NSString *)dirPath     pattern:(NSString *)pattern     verbose:(BOOL)verbose;` |
| `UnzipMatchingInto` | method | `- (NSNumber *)UnzipMatchingInto:(NSString *)dirPath     pattern:(NSString *)pattern     verbose:(BOOL)verbose;` |
| `UnzipNewer` | method | `- (NSNumber *)UnzipNewer:(NSString *)dirPath;` |
| `VerifyPassword` | method | `- (BOOL)VerifyPassword;` |
| `WriteBd` | method | `- (BOOL)WriteBd:(CkoBinData *)binData;` |
| `WriteToMemory` | method | `- (NSData *)WriteToMemory;` |
| `WriteZip` | method | `- (BOOL)WriteZip;` |
| `WriteZipAndClose` | method | `- (BOOL)WriteZipAndClose;` |

Deprecated members are listed at the end of this file with their replacements; do not use them in new code.

## Properties

### Zip.AbortCurrent

`Chilkat 11.7.0 · objc · Zip · AbortCurrent · property · read/write · since 9.5.0.58`

```objectivec
@property (nonatomic) BOOL AbortCurrent;
```

Stops the currently executing operation when set to `YES`.

- Used to cancel long-running operations such as compression or extraction.
- Can be triggered from another thread.
- Automatically resets to `NO` after the operation stops.

### Zip.AppendFromDir

`Chilkat 11.7.0 · objc · Zip · AppendFromDir · property · read/write`

```objectivec
@property (nonatomic, copy) NSString *AppendFromDir;
```

Specifies a base directory when adding files to the ZIP.

- This portion of the path is **not included** in stored ZIP entry paths.
- Useful for controlling relative paths inside the archive.

For example, to add all files under `c:/abc/123/myAppDir`, this property could be set to `c:/abc/123`, and `myAppDir/*` would be passed to `AppendFiles`.

The path stored in the ZIP would begin with `myAppDir/`.

### Zip.CaseSensitive

`Chilkat 11.7.0 · objc · Zip · CaseSensitive · property · read/write`

```objectivec
@property (nonatomic) BOOL CaseSensitive;
```

Controls whether filename matching is case-sensitive.

- Affects methods such as `EntryMatching` and `UnzipMatching`.
- Default: `NO`

### Zip.ClearArchiveAttribute

`Chilkat 11.7.0 · objc · Zip · ClearArchiveAttribute · property · read/write`

```objectivec
@property (nonatomic) BOOL ClearArchiveAttribute;
```

`(Windows only)`

If `YES`, clears the Windows archive attribute after files are successfully added to the ZIP.

The archive attribute indicates that a file has changed since the last backup.

The default value is `NO`.

### Zip.ClearReadOnlyAttr

`Chilkat 11.7.0 · objc · Zip · ClearReadOnlyAttr · property · read/write`

```objectivec
@property (nonatomic) BOOL ClearReadOnlyAttr;
```

If `YES`, removes the read-only attribute from extracted files.

If `NO`, the read-only attribute remains unchanged.

The default value is `NO`.

### Zip.Comment

`Chilkat 11.7.0 · objc · Zip · Comment · property · read/write`

```objectivec
@property (nonatomic, copy) NSString *Comment;
```

Sets or retrieves the global ZIP file comment.

The default value is the empty string.

### Zip.DecryptPassword

`Chilkat 11.7.0 · objc · Zip · DecryptPassword · property · read/write`

```objectivec
@property (nonatomic, copy) NSString *DecryptPassword;
```

Password used to extract encrypted ZIP archives.

- Required to unzip encrypted entries.
- Encrypted ZIP files may still be opened without a password, but their contents cannot be extracted until the correct password is provided.

The default value is the empty string.

### Zip.DiscardPaths

`Chilkat 11.7.0 · objc · Zip · DiscardPaths · property · read/write`

```objectivec
@property (nonatomic) BOOL DiscardPaths;
```

If `YES`, removes all directory path information when adding files.

Only filenames are stored in the ZIP.

The default value is `NO`.

### Zip.Encryption

`Chilkat 11.7.0 · objc · Zip · Encryption · property · read/write`

```objectivec
@property (nonatomic, copy) NSNumber *Encryption;
```

Specifies encryption mode:

- `0` → No encryption
- `4` → WinZip-compatible AES encryption

**Important:** `Encryption` and `PasswordProtect` are mutually exclusive.

If `PasswordProtect = YES`, then `Encryption` should be `0`.

The default value is `0`.

### Zip.EncryptKeyLength

`Chilkat 11.7.0 · objc · Zip · EncryptKeyLength · property · read/write`

```objectivec
@property (nonatomic, copy) NSNumber *EncryptKeyLength;
```

Specifies the AES encryption key length.

- Valid values: `128`, `192`, or `256`

The default value is `128`.

### Zip.EncryptPassword

`Chilkat 11.7.0 · objc · Zip · EncryptPassword · property · read/write`

```objectivec
@property (nonatomic, copy) NSString *EncryptPassword;
```

Password used when creating encrypted ZIP archives.

The default value is the empty string.

### Zip.FileCount

`Chilkat 11.7.0 · objc · Zip · FileCount · property · read-only`

```objectivec
@property (nonatomic, readonly, copy) NSNumber *FileCount;
```

Number of files in the ZIP, excluding directory entries.

### Zip.FileName

`Chilkat 11.7.0 · objc · Zip · FileName · property · read/write`

```objectivec
@property (nonatomic, copy) NSString *FileName;
```

Path of the ZIP file to be written or overwritten.

The default value is the empty string.

### Zip.HasZipFormatErrors

`Chilkat 11.7.0 · objc · Zip · HasZipFormatErrors · property · read-only`

```objectivec
@property (nonatomic, readonly) BOOL HasZipFormatErrors;
```

Indicates whether minor ZIP format problems were detected when opening the ZIP archive.

### Zip.HeartbeatMs

`Chilkat 11.7.0 · objc · Zip · HeartbeatMs · property · read/write`

```objectivec
@property (nonatomic, copy) NSNumber *HeartbeatMs;
```

**Full documentation for this property (same in every language):** [Event Callback Examples](https://www.chilkatsoft.com/ai-docs/v/11.7.0/articles/event_callback_examples.md)

Interval, in milliseconds, between abort-check callbacks.

If set to `0`, abort callbacks are disabled.

The default value is `0`.

### Zip.IgnoreAccessDenied

`Chilkat 11.7.0 · objc · Zip · IgnoreAccessDenied · property · read/write`

```objectivec
@property (nonatomic) BOOL IgnoreAccessDenied;
```

If `YES`, files that cannot be read, written, or created due to filesystem permission errors are skipped.

If `NO`, any access-denied error causes the ZIP operation to fail.

The default value is `YES`.

### Zip.MaxDate

`Chilkat 11.7.0 · objc · Zip · MaxDate · property · read/write · since 10.0.0`

```objectivec
@property (nonatomic, copy) NSString *MaxDate;
```

Maximum last-modified timestamp for files processed during add or extract operations.

Files having modification timestamps later than this value are skipped.

Supports ISO 8601 date/time formats, including:

- `YYYY-MM-DD`  
  Example: `2024-07-31`
- `YYYY-MM-DDTHH:MM:SS±HH:MM`  
  Example: `2024-07-31T12:34:56+02:00`
- `YYYY-MM-DDTHH:MM:SSZ`  
  Example: `2024-07-31T12:34:56Z`

The default value is the empty string, meaning no maximum date restriction.

### Zip.MaxUncompressSize

`Chilkat 11.7.0 · objc · Zip · MaxUncompressSize · property · read/write · since 9.5.0.96`

```objectivec
@property (nonatomic, copy) NSNumber *MaxUncompressSize;
```

Prevents extraction of files larger than the specified uncompressed size.

A value of `0` means no size limit.

The default value is `0`.

### Zip.MinDate

`Chilkat 11.7.0 · objc · Zip · MinDate · property · read/write · since 10.0.0`

```objectivec
@property (nonatomic, copy) NSString *MinDate;
```

Minimum last-modified timestamp for files processed during add or extract operations.

Supports ISO 8601 date/time formats, including:

- `YYYY-MM-DD`  
  Example: `2024-07-31`
- `YYYY-MM-DDTHH:MM:SS±HH:MM`  
  Example: `2024-07-31T12:34:56+02:00`
- `YYYY-MM-DDTHH:MM:SSZ`  
  Example: `2024-07-31T12:34:56Z`

The default value is the empty string, meaning no minimum date restriction.

### Zip.NumEntries

`Chilkat 11.7.0 · objc · Zip · NumEntries · property · read-only`

```objectivec
@property (nonatomic, readonly, copy) NSNumber *NumEntries;
```

Total number of entries in the ZIP, including both files and directories.

### Zip.OemCodePage

`Chilkat 11.7.0 · objc · Zip · OemCodePage · property · read/write`

```objectivec
@property (nonatomic, copy) NSNumber *OemCodePage;
```

Specifies the OEM code page used for ZIP filename encoding.

Defaults to the OEM code page of the current computer.

### Zip.OverwriteExisting

`Chilkat 11.7.0 · objc · Zip · OverwriteExisting · property · read/write`

```objectivec
@property (nonatomic) BOOL OverwriteExisting;
```

If `YES`, existing files are overwritten during extraction.

The default value is `YES`.

### Zip.PasswordProtect

`Chilkat 11.7.0 · objc · Zip · PasswordProtect · property · read/write`

```objectivec
@property (nonatomic) BOOL PasswordProtect;
```

Indicates whether the ZIP uses legacy Zip 2.0 password protection.

This property is set automatically when a ZIP archive is opened by any of the `Open*` methods, such as `OpenZip`, `OpenFromMemory`, `OpenBd`, and related methods.

**Important:** `PasswordProtect` and `Encryption` are mutually exclusive.

If `PasswordProtect = YES`, then `Encryption` should be `0`.

The default value is `NO`.

### Zip.PathPrefix

`Chilkat 11.7.0 · objc · Zip · PathPrefix · property · read/write`

```objectivec
@property (nonatomic, copy) NSString *PathPrefix;
```

Gets or sets a path prefix that is prepended to ZIP entry paths for files appended from the local filesystem.

This is useful when you want all extracted files to appear under a specific subdirectory.

This property affects only the following methods:

- `AppendFiles`
- `AppendFilesEx`
- `AddFile`
- `AppendOneFileOrDir`

The `PathPrefix` value is prepended to the stored ZIP path for each appended filesystem file.

For example, set PathPrefix to subdir/ so that files are stored in the ZIP with subdir/ prepended to their paths. When extracted, the files will be placed under the subdir directory.

This property does not affect entries added entirely from memory, such as entries added using:

- `AddString`
- `AddData`
- `AddBd`
- `AddSb`

For in-memory entries, the ZIP entry path is determined solely by the filename/path argument passed to the method.

The default value is the empty string.

### Zip.PercentDoneScale

`Chilkat 11.7.0 · objc · Zip · PercentDoneScale · property · read/write · since 9.5.0.49`

```objectivec
@property (nonatomic, copy) NSNumber *PercentDoneScale;
```

Controls the granularity of PercentDone event callbacks.

This property is only applicable in programming environments that support event callbacks.

The value specifies what should be considered `100%` complete for progress reporting purposes.

- A value of `100` provides whole-percent progress updates.
- A value of `1000` provides tenth-percent granularity.
- For example, with a scale of `1000`, a PercentDone callback value of `453` represents `45.3%` complete.

Increasing this value allows for more frequent and finer-grained progress callbacks during long-running operations.

The value is automatically clamped to the range:

- Minimum: `10`
- Maximum: `100000`

The default value is `100`.

### Zip.PwdProtCharset

`Chilkat 11.7.0 · objc · Zip · PwdProtCharset · property · read/write · since 9.5.0.73`

```objectivec
@property (nonatomic, copy) NSString *PwdProtCharset;
```

Specifies the character encoding used to convert the decrypt password into its binary byte representation for legacy password-protected ZIP archives that use Zip 2.0 encryption.

The default value is `ansi`.

Other possible values include:

- `cp850`
- `cp437`
- Any supported Windows or OEM code page listed at the link below.

This property applies only to older Zip 2.0 password protection and is not used for AES-encrypted ZIP archives.

### Zip.TempDir

`Chilkat 11.7.0 · objc · Zip · TempDir · property · read/write`

```objectivec
@property (nonatomic, copy) NSString *TempDir;
```

Directory used for temporary files during ZIP operations.

When overwriting an existing ZIP file, a temporary file is used to avoid corrupting the original ZIP if an error occurs.

The default value depends on the runtime environment.

### Zip.UncommonOptions

`Chilkat 11.7.0 · objc · Zip · UncommonOptions · property · read/write · since 9.5.0.84`

```objectivec
@property (nonatomic, copy) NSString *UncommonOptions;
```

Advanced options for uncommon scenarios.

- `ForceZip64` → Forces ZIP64 format even when not required.

The default value is the empty string.

### Zip.Zipx

`Chilkat 11.7.0 · objc · Zip · Zipx · property · read/write`

```objectivec
@property (nonatomic) BOOL Zipx;
```

If `YES`, creates ZIPX archives using the most appropriate compression method for each file.

The default value is `NO`.

### Zip.ZipxDefaultAlg

`Chilkat 11.7.0 · objc · Zip · ZipxDefaultAlg · property · read/write`

```objectivec
@property (nonatomic, copy) NSString *ZipxDefaultAlg;
```

Default compression algorithm used when creating ZIPX archives.

- Possible values include:
  - `deflate`
  - `ppmd`
  - `lzma`
  - `bzip2`
  - `deflate64`

The default value is `deflate`.

## Methods

### Zip.AddBd

`Chilkat 11.7.0 · objc · Zip · AddBd · method · since 11.0.0`

```objectivec
- (BOOL)AddBd:(NSString *)pathInZip 
    bd:(CkoBinData *)bd;
```

Adds the contents of a `BinData` object as a new entry in the ZIP archive.

- `pathInZip` specifies the filename and optional directory path stored within the ZIP.
- The bytes contained in `bd` become the contents of the ZIP entry.
- The entry is added to the in-memory ZIP object and is not written to disk until `WriteZip`, `WriteZipAndClose`, `WriteBd`, or `WriteToMemory` is called.

Returns YES for success, NO for failure.

### Zip.AddEmpty

`Chilkat 11.7.0 · objc · Zip · AddEmpty · method · since 11.0.0`

```objectivec
- (BOOL)AddEmpty:(BOOL)isDir 
    pathInZip:(NSString *)pathInZip;
```

Adds an empty file or directory entry to the ZIP archive.

- If `isDir = YES`, an empty directory entry is created.
- If `isDir = NO`, an empty file entry is created.
- `pathInZip` specifies the path stored in the ZIP archive.

This method is useful when directory structure entries must exist even if no files are present.

Returns YES for success, NO for failure.

### Zip.AddEncoded

`Chilkat 11.7.0 · objc · Zip · AddEncoded · method · since 11.0.0`

```objectivec
- (BOOL)AddEncoded:(NSString *)pathInZip 
    encoding:(NSString *)encoding 
    data:(NSString *)data;
```

Adds encoded binary data as a ZIP entry.

- `encoding` specifies how `data` is encoded.
- Common encodings include `base64` and `hex`.
- The decoded binary bytes become the contents of the ZIP entry.

This method is useful when binary data already exists in textual encoded form.

Returns YES for success, NO for failure.

### Zip.AddFile

`Chilkat 11.7.0 · objc · Zip · AddFile · method · since 11.0.0`

```objectivec
- (BOOL)AddFile:(NSString *)localPath 
    saveExtraPath:(BOOL)saveExtraPath;
```

Adds a file or directory from the local filesystem to the ZIP archive.

- If `localPath` is an absolute path and `saveExtraPath = YES`, the stored ZIP path includes the relative directory structure.
- If `saveExtraPath = NO`, only the filename is stored.
- If `localPath` is already relative, the relative path is stored as-is regardless of `saveExtraPath`.

This method adds a reference to the file or directory in the local filesystem. The file data is not immediately read or compressed.

The actual file contents are consumed only when a `Write*` method is called, such as:

- `WriteZip`
- `WriteZipAndClose`
- `WriteBd`
- `WriteToMemory`

This allows files and data entries to be accumulated in the in-memory ZIP object prior to writing the final ZIP archive.

Returns YES for success, NO for failure.

### Zip.AddNoCompressExtension

`Chilkat 11.7.0 · objc · Zip · AddNoCompressExtension · method`

```objectivec
- (void)AddNoCompressExtension:(NSString *)fileExtension;
```

Adds a file extension to the internal "no-compression" list.

Files having these extensions are stored without compression because they are already compressed or because compression would provide little benefit.

For example:

- `.zip`
- `.jpg`
- `.png`
- `.gz`

The extension may be specified with or without the leading dot.

Additional extensions remain active for the lifetime of the Zip object unless removed with `RemoveNoCompressExtension`.

### Zip.AddSb

`Chilkat 11.7.0 · objc · Zip · AddSb · method · since 11.0.0`

```objectivec
- (BOOL)AddSb:(NSString *)pathInZip 
    sb:(CkoStringBuilder *)sb 
    charset:(NSString *)charset;
```

Adds the contents of a `StringBuilder` object as a text entry in the ZIP archive.

- The text is converted to bytes using the specified `charset`.
- `pathInZip` specifies the filename stored in the ZIP.

Returns YES for success, NO for failure.

### Zip.AddString

`Chilkat 11.7.0 · objc · Zip · AddString · method · since 11.0.0`

```objectivec
- (BOOL)AddString:(NSString *)pathInZip 
    content:(NSString *)content 
    charset:(NSString *)charset;
```

Adds a string as a text file entry in the ZIP archive.

- The string is converted to bytes using the specified `charset`.
- `pathInZip` specifies the path stored within the ZIP archive.

This method is useful for dynamically generating text files directly in memory.

Returns YES for success, NO for failure.

### Zip.AppendFiles

`Chilkat 11.7.0 · objc · Zip · AppendFiles · method`

```objectivec
- (BOOL)AppendFiles:(NSString *)filePattern 
    recurse:(BOOL)recurse;
```

Adds one or more files matching a wildcard pattern.

- The wildcard character `*` matches zero or more characters.
- If `recurse = YES`, subdirectories are processed recursively.
- If `recurse = NO`, only the current directory is searched.

For example:

> `AppendFiles("c:/temp/*.txt", NO)`

This method only updates the in-memory ZIP object. The ZIP file itself is not written until a `Write*` method is called.

Returns YES for success, NO for failure.

Async variant: `AppendFilesAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.AppendFilesEx

`Chilkat 11.7.0 · objc · Zip · AppendFilesEx · method`

```objectivec
- (BOOL)AppendFilesEx:(NSString *)filePattern 
    recurse:(BOOL)recurse 
    saveExtraPath:(BOOL)saveExtraPath 
    archiveOnly:(BOOL)archiveOnly 
    includeHidden:(BOOL)includeHidden 
    includeSystem:(BOOL)includeSystem;
```

Advanced version of `AppendFiles` with additional filtering and path options.

- `saveExtraPath` controls whether the extra leading path information from the `filePattern` is preserved in the ZIP.
- `archiveOnly` applies only on Windows and limits processing to files having the archive attribute set.
- `includeHidden` controls whether hidden files are included.
- `includeSystem` controls whether files with the System attribute are included.

This method adds references to files in the in-memory ZIP object. No ZIP file is written until a `Write*` method is called.

Returns YES for success, NO for failure.

Async variant: `AppendFilesExAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.AppendZip

`Chilkat 11.7.0 · objc · Zip · AppendZip · method`

```objectivec
- (BOOL)AppendZip:(NSString *)zipPath;
```

**Note:** This method is currently not working and will be fixed in v11.5.0

Adds all entries from another existing ZIP archive into the current ZIP object.

The `zipPath` argument specifies the path of a ZIP file located in the local filesystem.

All entries from the specified ZIP archive are appended to the current in-memory ZIP object.

The ZIP archive itself is not rewritten until a `Write*` method is called.

This method is useful for merging the contents of multiple ZIP archives into a single ZIP.

Returns YES for success, NO for failure.

### Zip.CloseZip

`Chilkat 11.7.0 · objc · Zip · CloseZip · method`

```objectivec
- (void)CloseZip;
```

Closes the currently open ZIP archive and clears all entries from the Zip object.

This method has the same effect as calling `NewZip` without specifying a filename.

### Zip.DeleteEntry

`Chilkat 11.7.0 · objc · Zip · DeleteEntry · method`

```objectivec
- (BOOL)DeleteEntry:(CkoZipEntry *)entry;
```

Removes a ZIP entry from the current ZIP object.

The ZIP file itself is not rewritten until a `Write*` method is called.

Returns YES for success, NO for failure.

### Zip.EntryAt

`Chilkat 11.7.0 · objc · Zip · EntryAt · method · since 11.0.0`

```objectivec
- (BOOL)EntryAt:(NSNumber *)index 
    entry:(CkoZipEntry *)entry;
```

Retrieves the ZIP entry at the specified zero-based index.

- The first entry is at index `0`.
- The matching entry is returned in the supplied `ZipEntry` object.

Returns YES for success, NO for failure.

### Zip.EntryById

`Chilkat 11.7.0 · objc · Zip · EntryById · method · since 11.0.0`

```objectivec
- (BOOL)EntryById:(NSNumber *)id 
    entry:(CkoZipEntry *)entry;
```

Finds a ZIP entry by its unique EntryID.

The matching entry is returned in the supplied `ZipEntry` object.

Returns YES for success, NO for failure.

### Zip.EntryMatching

`Chilkat 11.7.0 · objc · Zip · EntryMatching · method · since 11.0.0`

```objectivec
- (BOOL)EntryMatching:(NSString *)pattern 
    entry:(CkoZipEntry *)entry;
```

Finds the first ZIP entry whose stored path matches a wildcard pattern.

- The wildcard character `*` matches zero or more characters.
- The comparison is performed against the full stored ZIP path.

Returns YES for success, NO for failure.

### Zip.EntryOf

`Chilkat 11.7.0 · objc · Zip · EntryOf · method · since 11.0.0`

```objectivec
- (BOOL)EntryOf:(NSString *)pathInZip 
    entry:(CkoZipEntry *)entry;
```

Finds a ZIP entry whose stored path exactly matches `pathInZip`.

The matching entry is returned in the supplied `ZipEntry` object.

Returns YES for success, NO for failure.

### Zip.ExcludeDir

`Chilkat 11.7.0 · objc · Zip · ExcludeDir · method`

```objectivec
- (void)ExcludeDir:(NSString *)dirName;
```

Adds a directory name to the exclusion list used by recursive append operations.

- All directories having the specified name are skipped.
- The comparison is case-insensitive.
- Call multiple times to exclude multiple directory names.

This affects methods such as `AppendFiles` and `AppendFilesEx`.

### Zip.GetDirectoryAsXML

`Chilkat 11.7.0 · objc · Zip · GetDirectoryAsXML · method`

```objectivec
- (NSString *)GetDirectoryAsXML;
```

Returns the ZIP directory structure as an XML document.

The returned XML contains information about the entries currently contained within the ZIP archive, including files and directories.

This method is useful for inspecting ZIP contents without extracting files.

Returns the XML document as a string.

Returns `nil` on failure

### Zip.GetMaxUncompressedSize

`Chilkat 11.7.0 · objc · Zip · GetMaxUncompressedSize · method · since 9.5.0.96`

```objectivec
- (NSString *)GetMaxUncompressedSize;
```

Returns the largest uncompressed file size contained within the ZIP archive.

The size is returned as a string rather than an integer because the value may exceed the range of a 32-bit integer.

This method is useful when:

- Checking for extremely large files before extraction
- Estimating required disk space
- Detecting unusually large compressed entries

Returns the size as a decimal string.

Returns `nil` on failure

### Zip.IsNoCompressExtension

`Chilkat 11.7.0 · objc · Zip · IsNoCompressExtension · method`

```objectivec
- (BOOL)IsNoCompressExtension:(NSString *)fileExtension;
```

Checks whether a file extension is contained in the internal "no-compression" extension list.

Files having extensions in this list are stored without compression because they are typically already compressed.

The extension may be specified with or without the leading dot.

For example, both of the following are valid:

- `.jpg`
- `jpg`

Returns `YES` if the extension exists in the list, otherwise returns `NO`.

### Zip.IsPasswordProtected

`Chilkat 11.7.0 · objc · Zip · IsPasswordProtected · method`

```objectivec
- (BOOL)IsPasswordProtected:(NSString *)zipPath;
```

Checks whether a ZIP archive uses legacy Zip 2.0 password protection.

The `zipPath` argument specifies the path of a ZIP file in the local filesystem.

This method checks only for traditional Zip 2.0 password protection.

Returns `YES` if the ZIP archive is password protected, otherwise returns `NO`.

### Zip.LoadTaskCaller

`Chilkat 11.7.0 · objc · Zip · LoadTaskCaller · method · since 9.5.0.80`

```objectivec
- (BOOL)LoadTaskCaller:(CkoTask *)task;
```

Loads the caller of the task's async method.

Returns YES for success, NO for failure.

### Zip.NewZip

`Chilkat 11.7.0 · objc · Zip · NewZip · method`

```objectivec
- (BOOL)NewZip:(NSString *)zipPath;
```

Initializes a new empty ZIP archive.

- If another ZIP archive is currently open, it is closed.
- All existing in-memory ZIP entries are discarded.
- The `FileName` property is set to `zipPath`.

No ZIP file is actually created until a `Write*` method is called.

This method resets the Zip object to a clean empty state.

Returns YES for success, NO for failure.

### Zip.OpenBd

`Chilkat 11.7.0 · objc · Zip · OpenBd · method · since 9.5.0.66`

```objectivec
- (BOOL)OpenBd:(CkoBinData *)binData;
```

Opens a ZIP archive contained entirely within a `BinData` object.

This method allows ZIP archives to be processed entirely in memory without requiring a filesystem file.

When a ZIP archive is opened:

- `PasswordProtect` is automatically set if legacy Zip 2.0 encryption is detected.
- `Encryption` is automatically set if strong encryption is detected.
- A value of `4` for `Encryption` indicates WinZip-compatible AES encryption.

Returns YES for success, NO for failure.

### Zip.OpenFromByteData

`Chilkat 11.7.0 · objc · Zip · OpenFromByteData · method`

```objectivec
- (BOOL)OpenFromByteData:(NSData *)byteData;
```

Opens a ZIP archive from in-memory byte data.

When the ZIP archive is opened:

- `PasswordProtect` is automatically set if legacy password protection is detected.
- `Encryption` is automatically set if strong encryption is detected.
- `Encryption = 4` indicates AES encryption.

Returns YES for success, NO for failure.

### Zip.OpenFromMemory

`Chilkat 11.7.0 · objc · Zip · OpenFromMemory · method`

```objectivec
- (BOOL)OpenFromMemory:(NSData *)inData;
```

Opens a ZIP archive directly from in-memory binary data.

This allows ZIP processing without using filesystem files.

Typical use cases include:

- ZIP data loaded from a database
- ZIP data received from HTTP responses
- ZIP data stored entirely in memory

When the ZIP archive is opened:

- `PasswordProtect` is automatically set if Zip 2.0 encryption is detected.
- `Encryption` is automatically set if strong encryption is detected.

Returns YES for success, NO for failure.

### Zip.OpenZip

`Chilkat 11.7.0 · objc · Zip · OpenZip · method`

```objectivec
- (BOOL)OpenZip:(NSString *)zipPath;
```

Opens a ZIP archive from the local filesystem.

The `zipPath` argument specifies the path of the ZIP file to open.

Encrypted ZIP archives may be opened without providing a password, but encrypted entries cannot be extracted until the correct password is provided using `DecryptPassword`.

When the ZIP archive is opened:

- `PasswordProtect` is automatically set if legacy Zip 2.0 encryption is detected.
- `Encryption` is automatically set if strong encryption is detected.
- `Encryption = 4` indicates WinZip-compatible AES encryption.

Returns YES for success, NO for failure.

Async variant: `OpenZipAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.QuickAppend

`Chilkat 11.7.0 · objc · Zip · QuickAppend · method`

```objectivec
- (BOOL)QuickAppend:(NSString *)zipPath;
```

Efficiently appends additional entries to an existing ZIP archive.

The `zipPath` argument specifies the path of an existing ZIP archive in the local filesystem.

This method avoids rewriting existing entries.

- Existing ZIP entries remain unchanged.
- New entries are appended to the end of the ZIP archive.
- The ZIP central directory is updated accordingly.

This method is typically faster than rebuilding the entire ZIP archive.

Returns YES for success, NO for failure.

Async variant: `QuickAppendAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.RemoveNoCompressExtension

`Chilkat 11.7.0 · objc · Zip · RemoveNoCompressExtension · method`

```objectivec
- (void)RemoveNoCompressExtension:(NSString *)fileExtension;
```

Removes a file extension from the internal "no-compression" extension list.

After removal, files having this extension may be compressed normally.

The extension may be specified with or without the leading dot.

### Zip.SetCompressionLevel

`Chilkat 11.7.0 · objc · Zip · SetCompressionLevel · method`

```objectivec
- (void)SetCompressionLevel:(NSNumber *)level;
```

Sets the compression level for all file and data entries currently contained within the ZIP object.

- `0` → No compression
- `9` → Maximum compression

The default compression level is `6`.

**Important:** This method should be called after files or data entries have already been added to the ZIP object.

The compression level cannot be changed for mapped entries originating from an already-open ZIP archive.

### Zip.SetExclusions

`Chilkat 11.7.0 · objc · Zip · SetExclusions · method`

```objectivec
- (void)SetExclusions:(CkoStringArray *)excludePatterns;
```

Specifies a collection of wildcard exclusion patterns used when adding files to the ZIP archive.

Each pattern may use the wildcard character `*` to match zero or more characters.

Files matching any exclusion pattern are skipped.

### Zip.Unzip

`Chilkat 11.7.0 · objc · Zip · Unzip · method`

```objectivec
- (NSNumber *)Unzip:(NSString *)dirPath;
```

Extracts all files and directories from the ZIP archive.

- `dirPath` specifies the destination directory.
- Subdirectories are automatically created as needed.

Returns the number of files extracted.

Returns `-1` if a failure occurs.

Async variant: `UnzipAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.UnzipInto

`Chilkat 11.7.0 · objc · Zip · UnzipInto · method`

```objectivec
- (NSNumber *)UnzipInto:(NSString *)dirPath;
```

Extracts all files into a single directory.

All directory path information stored within the ZIP archive is ignored.

If multiple files have the same filename, later extracted files overwrite earlier ones.

Returns the number of files extracted, or `-1` on failure.

Async variant: `UnzipIntoAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.UnzipMatching

`Chilkat 11.7.0 · objc · Zip · UnzipMatching · method`

```objectivec
- (NSNumber *)UnzipMatching:(NSString *)dirPath 
    pattern:(NSString *)pattern 
    verbose:(BOOL)verbose;
```

Extracts only entries whose stored paths match a wildcard pattern.

- The wildcard character `*` matches zero or more characters.
- If no wildcard is used, an exact filename match is required.

Subdirectories are automatically created as needed.

Returns the number of files extracted, or `-1` on failure.

Async variant: `UnzipMatchingAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.UnzipMatchingInto

`Chilkat 11.7.0 · objc · Zip · UnzipMatchingInto · method`

```objectivec
- (NSNumber *)UnzipMatchingInto:(NSString *)dirPath 
    pattern:(NSString *)pattern 
    verbose:(BOOL)verbose;
```

Extracts matching entries into a single directory while ignoring all stored ZIP path information.

Matching behavior is identical to `UnzipMatching`.

If duplicate filenames occur, later extracted files overwrite earlier ones.

Returns the number of files extracted, or `-1` on failure.

Async variant: `UnzipMatchingIntoAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.UnzipNewer

`Chilkat 11.7.0 · objc · Zip · UnzipNewer · method`

```objectivec
- (NSNumber *)UnzipNewer:(NSString *)dirPath;
```

Extracts only files that:

- Do not already exist
- Or have older modification timestamps than the ZIP entry

Subdirectories are automatically created as needed.

Returns the number of files extracted, or `-1` on failure.

Async variant: `UnzipNewerAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.VerifyPassword

`Chilkat 11.7.0 · objc · Zip · VerifyPassword · method`

```objectivec
- (BOOL)VerifyPassword;
```

Verifies that the current `DecryptPassword` value is correct for the currently opened ZIP archive.

This method allows password validation before attempting extraction.

Returns `YES` if the password is valid, otherwise returns `NO`.

### Zip.WriteBd

`Chilkat 11.7.0 · objc · Zip · WriteBd · method · since 9.5.0.66`

```objectivec
- (BOOL)WriteBd:(CkoBinData *)binData;
```

Writes the ZIP archive to a `BinData` object instead of a filesystem file.

The generated ZIP archive exists entirely in memory.

The ZIP data written by this method may later be opened using `OpenBd`.

Returns YES for success, NO for failure.

Async variant: `WriteBdAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.WriteToMemory

`Chilkat 11.7.0 · objc · Zip · WriteToMemory · method`

```objectivec
- (NSData *)WriteToMemory;
```

Same as WriteZip, but instead of writing the Zip to a file, it writes to memory. Zips that are written to memory can also be opened from memory by calling OpenFromMemory.

Returns `nil` on failure

Async variant: `WriteToMemoryAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.WriteZip

`Chilkat 11.7.0 · objc · Zip · WriteZip · method`

```objectivec
- (BOOL)WriteZip;
```

Saves the Zip to a file and implictly re-opens it so further operations can continue. Use WriteZipAndClose to write and close the Zip. There is no limitation on the size of files that may be contained within a .zip, the total number of files in a .zip, or the total size of a .zip. If necessary, WriteZip will use the ZIP64 file format extensions when 4GB or file count limitations of the old zip file format are exceeded.

Returns YES for success, NO for failure.

Async variant: `WriteZipAsync` — same arguments, returns a `Task` (see Async variants below).

### Zip.WriteZipAndClose

`Chilkat 11.7.0 · objc · Zip · WriteZipAndClose · method`

```objectivec
- (BOOL)WriteZipAndClose;
```

Saves the Zip to a file and closes it. On return, the Zip object will be in the state as if NewZip had been called. There is no limitation on the size of files that may be contained within a .zip, the total number of files in a .zip, or the total size of a .zip. If necessary, WriteZip will use the ZIP64 file format extensions when 4GB or file count limitations of the old zip file format are exceeded.

Returns YES for success, NO for failure.

Async variant: `WriteZipAndCloseAsync` — same arguments, returns a `Task` (see Async variants below).

## Events and callbacks

To receive events, define your own class that inherits from CkoZipProgress and override just the methods you want to handle. The base class provides an empty implementation of every method, so anything you don't override is simply ignored.

Then create an instance of your class and pass it to the object's setEventCallbackObject: method. From that point on, the object calls your methods as the work proceeds.

**For example:**

```objectivec
  CkoZip *zip = [[CkoZip alloc] init];

  MyZipProgress *callbackObj = [[MyZipProgress alloc] init];

  [zip setEventCallbackObject:callbackObj];
```

**MyZipProgress interface example:**

```objectivec
#import "CkoZipProgress.h"

@interface MyZipProgress : CkoZipProgress {

}

    - (id)init;
    - (void)dealloc;
    - (void)dispose;

    - (void)AbortCheck:(BOOL *)abort;
    - (void)AddFilesBegin;
    - (void)AddFilesEnd;
    - (void)DirToBeAdded:(NSString *)path 
        skip:(BOOL *)skip;
    - (void)FileAdded:(NSString *)path 
        fileSize:(NSNumber *)fileSize 
        abort:(BOOL *)abort;
    - (void)FileUnzipped:(NSString *)path 
        compressedSize:(NSNumber *)compressedSize 
        fileSize:(NSNumber *)fileSize 
        abort:(BOOL *)abort;
    - (void)FileZipped:(NSString *)path 
        fileSize:(NSNumber *)fileSize 
        compressedSize:(NSNumber *)compressedSize 
        abort:(BOOL *)abort;
    - (void)PercentDone:(NSNumber *)pctDone 
        abort:(BOOL *)abort;
    - (void)ProgressInfo:(NSString *)name 
        value:(NSString *)value;
    - (void)SkippedForUnzip:(NSString *)path 
        compressedSize:(NSNumber *)compressedSize 
        fileSize:(NSNumber *)fileSize 
        isDirectory:(BOOL)isDirectory;
    - (void)TaskCompleted:(CkoTask *)task;
    - (void)ToBeAdded:(NSString *)path 
        fileSize:(NSNumber *)fileSize 
        skip:(BOOL *)skip;
    - (void)ToBeUnzipped:(NSString *)path 
        compressedSize:(NSNumber *)compressedSize 
        fileSize:(NSNumber *)fileSize 
        skip:(BOOL *)skip;
    - (void)ToBeZipped:(NSString *)path 
        fileSize:(NSNumber *)fileSize 
        skip:(BOOL *)skip;
    - (void)UnzipBegin;
    - (void)UnzipEnd;
    - (void)WriteZipBegin;
    - (void)WriteZipEnd;
@end
```

### Zip.AbortCheck (event)

`Chilkat 11.7.0 · objc · Zip · AbortCheck · event`

```objectivec
- (void)AbortCheck:(BOOL *)abort;
```

Enables a method call to be aborted by triggering the AbortCheck event at intervals defined by the `HeartbeatMs` property. If HeartbeatMs is set to its default value of 0, no events will occur. For instance, set HeartbeatMs to 200 to trigger 5 AbortCheck events per second.

### Zip.PercentDone (event)

`Chilkat 11.7.0 · objc · Zip · PercentDone · event`

```objectivec
- (void)PercentDone:(NSNumber *)pctDone 
    abort:(BOOL *)abort;
```

This provides the percentage completion for any method involving network communications or time-consuming processing, assuming the progress can be measured as a percentage. This event is triggered only when it's possible and logical to express the operation's progress as a percentage. The `pctDone` argument will range from 1 to 100. For methods that finish quickly, the number of PercentDone callbacks may vary, but the final callback will have `pctDone` equal to 100. For longer operations, callbacks will not exceed one per percentage point (e.g., 1, 2, 3, ..., 98, 99, 100).

The PercentDone callback also acts as an `AbortCheck` event. For fast methods where PercentDone fires, an AbortCheck event may not trigger since the PercentDone callback already provides an opportunity to abort. For longer operations, where time between PercentDone callbacks is extended, AbortCheck callbacks enable more responsive operation termination.

To abort the operation, set the `abort` output argument to `YES`. This will cause the method to terminate and return a failure status or corresponding failure value.

### Zip.ProgressInfo (event)

`Chilkat 11.7.0 · objc · Zip · ProgressInfo · event`

```objectivec
- (void)ProgressInfo:(NSString *)name 
    value:(NSString *)value;
```

This event callback provides `tag name`/value pairs that detail what occurs during a method call. To discover existing tag names, create code to handle the event, emit the pairs, and review them. Most tag names are self-explanatory.

Note: Some Chilkat methods don't fire any ProgressInfo events.

### Zip.TaskCompleted (event)

`Chilkat 11.7.0 · objc · Zip · TaskCompleted · event`

```objectivec
- (void)TaskCompleted:(CkoTask *)task;
```

Called from the background thread when an asynchronous task completes.

## Async variants

Each returns a `Task` instead of the result and takes the same arguments as the synchronous method; run the task, wait for `Finished`, then read the result from the task. No new Async methods are added from 11.7.0 on.

```objectivec
- (CkoTask *)AppendFilesAsync:(NSString *)filePattern 
    recurse:(BOOL)recurse;
- (CkoTask *)AppendFilesExAsync:(NSString *)filePattern 
    recurse:(BOOL)recurse 
    saveExtraPath:(BOOL)saveExtraPath 
    archiveOnly:(BOOL)archiveOnly 
    includeHidden:(BOOL)includeHidden 
    includeSystem:(BOOL)includeSystem;
- (CkoTask *)OpenZipAsync:(NSString *)zipPath;
- (CkoTask *)QuickAppendAsync:(NSString *)zipPath;
- (CkoTask *)UnzipAsync:(NSString *)dirPath;
- (CkoTask *)UnzipIntoAsync:(NSString *)dirPath;
- (CkoTask *)UnzipMatchingAsync:(NSString *)dirPath 
    pattern:(NSString *)pattern 
    verbose:(BOOL)verbose;
- (CkoTask *)UnzipMatchingIntoAsync:(NSString *)dirPath 
    pattern:(NSString *)pattern 
    verbose:(BOOL)verbose;
- (CkoTask *)UnzipNewerAsync:(NSString *)dirPath;
- (CkoTask *)WriteBdAsync:(CkoBinData *)binData;
- (CkoTask *)WriteToMemoryAsync;
- (CkoTask *)WriteZipAsync;
- (CkoTask *)WriteZipAndCloseAsync;
```

## Deprecated members — do not use in new code

| Member | Kind | Deprecated in | Use instead |
|---|---|---|---|
| `AppendBd` | method | before 11.6.1 | `AddBd` |
| `AppendData` | method | before 11.6.1 | `AddData` |
| `AppendDataEncoded` | method | before 11.6.1 | `AddEncoded` |
| `AppendNew` | method | before 11.6.1 | `AddEmpty` |
| `AppendNewDir` | method | before 11.6.1 | `AddEmpty` |
| `AppendOneFileOrDir` | method | before 11.6.1 | `AddFile` |
| `AppendSb` | method | before 11.6.1 | `AddSb` |
| `AppendString` | method | before 11.6.1 | `AddString` |
| `AppendString2` | method | before 11.6.1 | `AddString` |
| `FirstEntry` | method | before 11.6.1 | `EntryAt` |
| `FirstMatchingEntry` | method | before 11.6.1 | `EntryMatching` |
| `GetEntryByID` | method | before 11.6.1 | `EntryById` |
| `GetEntryByIndex` | method | before 11.6.1 | `EntryAt` |
| `GetEntryByName` | method | before 11.6.1 | `EntryOf` |
| `GetExclusions` | method | before 11.6.1 | — |
| `SetPassword` | method | before 11.6.1 | — |

## Related classes

[`BinData`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/objc/classes/BinData.md), [`StringArray`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/objc/classes/StringArray.md), [`StringBuilder`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/objc/classes/StringBuilder.md), [`Task`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/objc/classes/Task.md), [`ZipEntry`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/objc/classes/ZipEntry.md)

