Skip to content

Fix 0-byte file after zip extraction#10

Merged
caprado merged 2 commits into
mainfrom
fix/zip-extraction-0-byte
May 26, 2026
Merged

Fix 0-byte file after zip extraction#10
caprado merged 2 commits into
mainfrom
fix/zip-extraction-0-byte

Conversation

@caprado

@caprado caprado commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Routes zip extraction through the native Apache Commons Compress extractor (Kotlin) instead of the archive Dart package
  • The Dart archive package loads the entire zip into memory before extracting, causing 0-byte output files for large archives (e.g. 672MB 3DS ROMs)
  • Apache Commons Compress streams entries to disk with a 64KB buffer — same approach already used for 7z files

Fixes #9

Test plan

  • Download a large zip ROM (e.g. Mario Kart 7 3DS ~672MB) and verify extraction produces a non-zero file
  • Download a small zip ROM and verify extraction still works
  • Download a 7z ROM and verify extraction still works (no regression)

caprado added 2 commits May 25, 2026 17:08
The archive Dart package loads the entire zip into memory before
extracting, causing 0-byte output files for large archives (e.g. 672MB
3DS ROMs). Switch zip extraction to Apache Commons Compress on the
Kotlin side, which streams entries to disk with a 64KB buffer — same
approach already used for 7z files.

Fixes #9
- Route zip extraction through native Apache Commons Compress streaming
  extractor instead of the archive Dart package which loads entire zip
  into memory (OOM on large ROMs like 672MB 3DS files)
- Fix torrent progress listener calling _finishTorrentTask multiple
  times by guarding against re-entrant ticks
- Show indeterminate progress bar during extraction instead of stuck 0%
- Bump version to 1.3.1+4

Fixes #9
@caprado caprado force-pushed the fix/zip-extraction-0-byte branch from b8ffbb5 to dbd56cc Compare May 26, 2026 04:33
@caprado caprado merged commit 0b0881d into main May 26, 2026
5 checks passed
@caprado caprado deleted the fix/zip-extraction-0-byte branch May 26, 2026 04:37
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.

0 byte file after extraction

1 participant