Fix "No memory" error and freezing a browser tab#46
Fix "No memory" error and freezing a browser tab#46AnastasiaSliusar wants to merge 6 commits intoemscripten-forge:mainfrom
Conversation
|
Maybe some ideas for handling larger archives, I had these already two weeks before, but they were not necessary. Of course, you could put it into a ReadableStream, as this is how webstreams work. |
Dear @martenrichter thank you for your ideas! |
This PR has solutions for #43 and #45
Freezing a browser tab happened when decompressed data could be large. For example, when compressed file has 10MB, but decompressed data has 98MB.
Since real decompressed data size is not known, as the solution is to take a average compressed ratio according to the example of compressed file of 10 MB and realize inital memory for (size of compressed file * compressed ratio)MB. Drawback is that the more decompressed data is the slower archive_read_data method is itself.
