Skip to content

@capgo/capacitor-zip

Zip and unzip files natively on iOS and Android, with progress events and Android AES archives.

Compress folders for export, unpack downloaded updates, and listen to progress events during long archives. Android supports password protected AES zip via zip4j. iOS uses ZIPFoundation. Web supports unzip() with per file downloads.

Remember that zip() is not available on web, only unzip().

PlatformSupportNotes
iOSYesZIPFoundation, zip and unzip
AndroidYeszip4j, AES password support
WebPartialUnzip only, files download individually
  • zip - Compress a file or directory to create a ZIP archive.
  • unzip - Extract a ZIP archive to a specified destination directory.
MethodDescription
zipCompress a file or directory to create a ZIP archive.
unzipExtract a ZIP archive to a specified destination directory.
getPluginVersionGet the native plugin version.

This reference is synced from src/definitions.ts in capacitor-zip.

If you are using @capgo/capacitor-zip to plan native plugin work, connect it with Using @capgo/capacitor-zip for the native capability in Using @capgo/capacitor-zip, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives.