You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add Docusaurus docs site with TypeDoc API reference
Set up a Docusaurus site in docs/ with auto-generated API docs from
TypeScript via docusaurus-plugin-typedoc. Includes hand-written guides
for getting started, extraction, compression, password protection,
cancellation, and performance. Adds GitHub Actions workflow for
deploying to GitHub Pages. Slims down README to point to the docs site.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
react-native-nitro-unzip provides high-performance ZIP extraction and compression for React Native, powered by [Nitro Modules](https://nitro.margelo.com/).
8
+
9
+
## Requirements
10
+
11
+
| Requirement | Version |
12
+
|---|---|
13
+
| React Native | 0.75+ |
14
+
| Nitro Modules | 0.34+ |
15
+
| iOS | 13+ |
16
+
| Android SDK | 21+ |
17
+
18
+
:::info New Architecture Required
19
+
This library requires React Native's New Architecture (Fabric + TurboModules) as it is built on Nitro Modules.
console.log(`Extracted ${result.extractedFiles} files in ${result.duration}ms`);
55
+
```
56
+
57
+
The `getUnzip()` function creates an `Unzip` factory instance. From there you can create extraction tasks, compression tasks, and more. Each task is an independent, observable, and cancellable operation.
58
+
59
+
## Next Steps
60
+
61
+
-[Extraction](./usage/extraction) — extracting ZIP archives with progress tracking
62
+
-[Compression](./usage/compression) — creating ZIP archives from directories
63
+
-[Password Protection](./usage/password) — working with encrypted archives
react-native-nitro-unzip is designed for speed. Here's how it performs and why.
8
+
9
+
## Benchmarks
10
+
11
+
Tested on a 350MB archive with 10,432 small files (map tiles):
12
+
13
+
| Platform | Speed | Time |
14
+
|---|---|---|
15
+
| iOS (iPhone) |~500 files/sec |~20s |
16
+
| Android |~474 files/sec |~22s |
17
+
18
+
## Why It's Fast
19
+
20
+
### iOS
21
+
22
+
[SSZipArchive](https://github.com/ZipArchive/ZipArchive) uses C-based **libz** decompression with streaming extraction, avoiding memory overhead from loading the entire archive into memory.
23
+
24
+
### Android
25
+
26
+
The Android implementation uses several optimizations:
27
+
28
+
-**64KB I/O buffers** — 8x the default buffer size, reducing system call overhead
29
+
-**Batch directory creation** — creates directory trees in bulk rather than one at a time
30
+
-**Buffered streams** — wraps all I/O in buffered streams for efficient reads and writes
31
+
32
+
### Both Platforms
33
+
34
+
-**JSI callbacks** — progress updates go through JSI (JavaScript Interface), bypassing the React Native bridge entirely. No serialization or deserialization overhead.
35
+
-**Throttled updates** — progress callbacks fire at most once per second, so even archives with thousands of files don't flood the JS thread.
36
+
-**Background execution** — extraction runs on native background threads, keeping the UI responsive.
0 commit comments