Skip to content
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

[Feature Request]: ZStandard CHD support #10823

Closed
Jarvik7 opened this issue Feb 17, 2024 · 6 comments · Fixed by #10826
Closed

[Feature Request]: ZStandard CHD support #10823

Jarvik7 opened this issue Feb 17, 2024 · 6 comments · Fixed by #10826

Comments

@Jarvik7
Copy link

Jarvik7 commented Feb 17, 2024

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.

@refractionpcsx2
Copy link
Member

Is there a situation where the lzma decompression is too slow? Do you have a usecase where this is a problem?

@Jarvik7
Copy link
Author

Jarvik7 commented Feb 17, 2024

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.
hrydgard/ppsspp#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.

@TellowKrinkle
Copy link
Member

I assume this can be done by updating libchdr to the latest version?

@Jarvik7
Copy link
Author

Jarvik7 commented Feb 17, 2024

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.

@refractionpcsx2
Copy link
Member

The code change looks to just include zstd, which we already include, so it may be as Tellow says.

@stenzek
Copy link
Contributor

stenzek commented Feb 18, 2024

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.. 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants