The idea is using HTTP range requests. The emscripten fetch API can use them.
Basic implementation: The central directory is at the end of the file.
This means you can download the last kilobytes of a file to get the central directory.
Now you know where all bytes are stored inside the ZIP. When a certain file is requested download the range inside the ZIP.
This partial ZIP can be processed by our ZipFilesystem implementation.
Sounds like a fun side project. E.g. for the ynoproject devs because the are whining that keeping the index.json up to date is soooo much work. :P
This was already researched and looks feasible: https://rhardih.io/2021/04/listing-the-contents-of-a-remote-zip-archive-without-downloading-the-entire-file/
The idea is using HTTP range requests. The emscripten fetch API can use them.
Basic implementation: The central directory is at the end of the file. This means you can download the last kilobytes of a file to get the central directory.
Now you know where all bytes are stored inside the ZIP. When a certain file is requested download the range inside the ZIP.
This partial ZIP can be processed by our ZipFilesystem implementation.
Sounds like a fun side project. E.g. for the ynoproject devs because the are whining that keeping the index.json up to date is soooo much work. :P