Skip to content

File Unzip using miniz-cpp library#1098

Open
jw098 wants to merge 12 commits intoPokemonAutomation:mainfrom
jw098:unzip
Open

File Unzip using miniz-cpp library#1098
jw098 wants to merge 12 commits intoPokemonAutomation:mainfrom
jw098:unzip

Conversation

@jw098
Copy link
Collaborator

@jw098 jw098 commented Feb 25, 2026

Note: this does not extract tar files, only zip files.

@jw098 jw098 marked this pull request as draft February 25, 2026 09:01
@jw098 jw098 marked this pull request as ready for review February 25, 2026 17:29
@Mysticial
Copy link
Collaborator

Do we know how well this handles really large files?

Say you try to unzip a 10GB file. Does it store the whole thing in memory? (10GB memory usage)

Are there any progress indicators while it's decompressing a large file? Or does it just hang until it returns?

@jw098
Copy link
Collaborator Author

jw098 commented Feb 27, 2026

Do we know how well this handles really large files?

Say you try to unzip a 10GB file. Does it store the whole thing in memory? (10GB memory usage)

Are there any progress indicators while it's decompressing a large file? Or does it just hang until it returns?

Hmm. This will require looking deeper into the C API. The C++ wrapper can't do what you're asking. I'll look into it.

@Mysticial
Copy link
Collaborator

This can potentially get really intrusive depending on how the library is currently written. We'd also need to design an API to expose the progress.

What I envision is that in the table showing all the resources, when the user click Download, it will asynchronously start downloading and decompressing without locking the UI. Then we show the % complete or a progress bar on that row in the table. So there would be a background thread that manages the download(s). If we leave and re-enter the panel, the progress will still show the progress.

Most likely is that we inject a callback into the unzip routine that will be periodically called so we can update the UI with the % completed. This may need to go hand-in-hand with splitting up a large file so we don't hold the entire thing in memory.

IOW, a lot of investigation to be done.

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