-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for compressed disk images #204
Comments
@gingerbeardman I looked into implementing this using the download links that you mentioned in #273, but I was not able to make it work when running on Cloudflare Workers. I tried two different approaches:
I'll look into doing this entirely on the client, it looks like the archive.org server for archive contents has liberal CORS headers. |
Thanks for your efforts so far! |
Looks like that works, albeit very slowly. Here's an example: https://infinitemac.org/1996/KanjiTalk%207.5.3?cdrom=https://archive.org/download/bmac-vol3-1996-03/BMAC-VOL3-1996-03.ISO.7z |
archive.org can serve specific files from 7zip and zip archive, so we can use that to handle compressed images. We need to fetch the entire file first though, since the archive.org endpoint doesn't support range requests. Updates #204
I need better WiFi. I'll check it after the Christmas break |
Does not work in Firefox under macOS 14: |
@that-ben Oops, some leftover code that was affecting Firefox only. Should work now. |
So basically, as it is right now, when you request a .7z file, it downloads the whole file, then decompresses it and attaches it to the emulator, correct? And if so, what would happen if we requested a 7zipped 4.7GB DVD image, would it still work? Also, is it supposed to work with .zip archives too or is it only for .7z files? ...wanted to close the Japanese yellow bulb info window in the Finder after spending half an hour downloading that ARCHIVE.ORG 7z file in your link only to end up hitting CMD-W and closing the whole InfiniteMac browser tab. Well that sucks. Again. |
That sounds about right. Any size image should work, but it'll take longer to download (depending on your internet connection and archive.org's state) and in Firefox it'll end up being held in-memory, which may not work for a DVD image. It also works with .zip (if there are other archive types that archive.org displays the contents of, I can add those too). |
Try .sit ... JK 🤣 |
Ideally without having to recompress the disk image (which would go over CPU use limits of the Cloudflare Worker), but this may not be possible for all compression formats (see https://github.com/vasi/lzopfs#what-compression-formats-are-supported).
A pattern like https://github.com/mattgodbolt/zindex or https://github.com/circulosmeos/gztool where we build an index may be possible.
Requested for https://archive.org/details/macpeople-1998-no-2 and others
The text was updated successfully, but these errors were encountered: