Skip to content

fix(ios): zip interoperability for server-side unzippers (#367)#371

Draft
plrthink wants to merge 6 commits into
masterfrom
cursor/ios-zip-compatibility-b7ed
Draft

fix(ios): zip interoperability for server-side unzippers (#367)#371
plrthink wants to merge 6 commits into
masterfrom
cursor/ios-zip-compatibility-b7ed

Conversation

@plrthink

Copy link
Copy Markdown
Collaborator

Summary

Implements #367 (P1): make iOS-created ZIPs reliably consumable by common server unzippers.

Stacked on #370 (cancel/error codes) → #369 (listContents).

Fixes

  • zipFilesWithPassword honors encryptionType (STANDARD → ZipCrypto, AES-* → WinZip AES) instead of always writing AES
  • fsync zip output after successful create so immediate uploads/reads see full bytes
  • file-array zips apply the requested compression level
  • README interoperability guidance + scripts/validate-zip-header.js

Addresses the class of failures reported in #333 / #323 (iOS zip OK locally, fails in Node unzipper / Java ZipInputStream), especially AES-by-default password file arrays.

Test plan

  • npm test
  • node scripts/validate-zip-header.js on a sample archive
  • Device: create iOS zip with STANDARD password and extract with Node unzipper
  • Device: create plaintext iOS zip and extract with Java ZipInputStream
Open in Web Open in Cursor 

cursoragent and others added 3 commits July 25, 2026 01:37
Expose listContents, unzipFiles, and unzipFilesWithPassword on iOS and
Android so apps can inspect archives and extract only selected entries
without switching to another library.

Co-authored-by: Perry <plrthink@gmail.com>
Allow aborting in-flight zip/unzip work and reject with consistent
ERR_* codes on iOS and Android, including ERR_CANCELLED.

Co-authored-by: Perry <plrthink@gmail.com>
Honor STANDARD vs AES for file-array password zips, apply compression
levels to file arrays, and fsync output so immediate uploads see full
archives. Add a zip header validation script and README guidance.

Co-authored-by: Perry <plrthink@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants