copy / v86

x86 PC emulator and x86-to-wasm JIT, running in the browser
https://copy.sh/v86/
BSD 2-Clause "Simplified" License
19.86k stars 1.4k forks source link

[feature request] ZST support on disk images #1124

Closed Darin755 closed 3 months ago

Darin755 commented 3 months ago

Does v86 support using zst compression on raw disk images? As far as I can tell ZST only works on snapshots. I am trying to use hda with a disk image but the image is far to big for Github so I am looking to shrink it down. When I use ZST compression I get something that is approximately 7% of the original size. Is there any way I can boot from this image using compression?

SuperMaxusa commented 3 months ago

See https://github.com/copy/v86/commit/8aa33c70117a44e584dbbbb64e2fc360a62f8a29, you need to leave .zst at end of the file name and specify the original size in bytes.

hda: {
    url: "hdd.img.zst",
    async: false,
    size: <mb> * 1024 * 1024
}
Darin755 commented 3 months ago

See 8aa33c7, you need to leave .zst at end of the file name and specify the original size in bytes.

hda: {
    url: "hdd.img.zst",
    async: false,
    size: <mb> * 1024 * 1024
}

Thanks! Maybe that could be added to the docs at some point