Repository navigation
Conversation
…` and updating `nativescript.config.ts` and `package.json`.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Windows: managed C# engine (platforms/windows/src/ZipArchiver.cs) on .NET DeflateStream and BCL cryptography, running off the JS thread. Linux: native engine (platforms/linux) on a vendored, pinned minizip-ng 4.2.2 with system zlib, GLib and OpenSSL libcrypto. Work runs on a GThread and reports progress/completion on the GLib main context. Both stream data (constant memory, ZIP64), write WinZip AES-256 when a password is given, read AES and ZipCrypto archives, and extract into temporary files that are only moved into place after the size, CRC and AES authentication checks pass.
triniwiz
force-pushed
the
feat/zip-windows-linux
branch
from
November 14, 2026 18:16
9cdde36 to
fe03b81
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Windows and Linux support to
@nativescript/zip.Approach
Both platforms run the work natively, off the JS thread. The public API and
index.d.tsare unchanged.platforms/windows/src/ZipArchiver.cs: managed C# compiled into the app, using .NETDeflateStreamand BCL cryptography.ZipAsync/UnzipAsyncreturn aTaskand report progress through anAction<int>.index.windows.tsplatforms/linux: a small C wrapper (src/nszip.c, public API ininclude/nszip.h) on a vendored, pinned minizip-ng 4.2.2 (src/minizip-ng, seeVENDORED.md). It links the system zlib, GLib and OpenSSLlibcrypto. Jobs run on aGThread; progress and completion are posted to the GLib main context. Onlynszip_zip/nszip_unzipare exported (-fvisibility=hidden).index.linux.ts(viainterop.callback)Behaviour on both platforms
passworduses WinZip AES-256, matching iOS and Android. Unzipping supports AES and legacy ZipCrypto.../, absolute paths, drive letters),It also stops an entry as soon as it produces more data than it declares. On Windows, reserved device names, alternate data streams and trailing dots or spaces are neutralised.
overwrite: falsekeeps existing files, andkeepParentworks as before. Progress is reported in whole percent and never goes backwards.Linux build requirement
Apps that use the plugin need the OpenSSL development headers to build:
libssl-dev(Debian/Ubuntu/Pop!_OS) oropenssl-devel(Fedora). End users need nothing extra, since zlib, GLib andlibcrypto.so.3are part of the base system on current desktop distributions. This is documented in the README.Testing
keepParent, forced ZIP64, and a 4.5 GB entry. Peak memory was about 8 MB for C and about 50 MB for C# (the .NET baseline).unzip -t, Pythonzipfileand pyzipper (AES). Both engines extract Info-ZIP, ZipCrypto and pyzipper AES archives byte-identical.native.jsonflags on Pop!_OS 24.04, and links onlylibz.so.1,libglib-2.0.so.0andlibcrypto.so.3.Not yet verified inside the Windows and Linux NativeScript runtimes. Please exercise the demo app on both, especially the
NSWinRTtask/delegate bridge on Windows and theinterop.callbackglue on Linux.