Description
I’m able to use your library to decompress a large, nested archive file in the browser (it seems that for each nested decompression step, I need to create a new JS7z instance, otherwise it will not call onExit, and i only can use onExit to callback after finished decompression ). However, the file sizes can be quite large — for example, 4GB or more(i only tested 1GB) — and loading everything entirely into memory could become a serious issue.
I did some research and found wasmFS. It seems that wasmFS offers better performance, and it also appears to support direct read/write access to OPFS, or "enable streaming files directly to a backend without loading the entire file into memory similar to the function of WorkerFS".
https://emscripten.org/docs/api_reference/Filesystem-API.html#new-file-system-wasmfs
File System Layer Design Doc
Would it be possible for your library to support wasmFS? Or is there a better way to enable streaming or avoid loading the entire archive into memory?
I’m sorry — I’m not familiar with C/C++ and i'm using the Windows, so compiling it myself would be quite costly in terms of time and effort.
Currently, with the MEMFS-based implementation, the available memory must be at least twice the size of the archive: once for the compressed source file, and at least once more for the extracted contents.