pcsx2
pcsx2 copied to clipboard
[Feature Request]: ZStandard CHD support
Description
Add ZStandard compression to CHD support. This is already supported in libchdr and has been recently added to MAME, redream, etc.
Reason
This gives a compression ratio between deflate and lzma, but drastically faster decompression time than either. Obviously this should improve the playing experience, especially on lower powered systems.
Examples
MAME, redream, chdman, RomVault, etc.
Is there a situation where the lzma decompression is too slow? Do you have a usecase where this is a problem?
Is there a situation where the lzma decompression is too slow? Do you have a usecase where this is a problem?
Thanks for your quick reply. I think it's basically the same discussion as happened on ppsspp github. https://github.com/hrydgard/ppsspp/pull/18824
Basically on low powered hardware or games with streaming assets it can be an issue. Even on typical systems a faster algorithm should reduce load times though. In any case it's already in libchdr so it's just a matter of hooking it up and letting users decide where they sit on the filesize<->performance spectrum.
I assume this can be done by updating libchdr to the latest version?
I assume this can be done by updating libchdr to the latest version?
Looking at the ppsspp commit I linked above (link fixed), it seems like a relatively minor code change.
The code change looks to just include zstd, which we already include, so it may be as Tellow says.
Any system that is capable of running PS2 games is unlikely to struggle to decompress LZMA in time, especially since it's threaded. But that said, this is basically free.
~~Probably should add it to my libchdr fork and swap over to that, it has a bunch of other improvements too.~~ Edit: Turns out I've already done that.. 🤣