Open crashGG opened 11 months ago
fbneo doesn't support chd at all.
@crashGG Sorry for the late answer, it seems i totally overlooked this issue. Tbh, i want to say no here, mostly due to compiler backward compatibility concerns.
In addition to mame, many emulators have recently added zstd decoding support. This seems to be a trend. PCSX2: https://github.com/PCSX2/pcsx2/pull/10826 duckstation https://github.com/stenzek/duckstation/commit/0e6a9f637bc1975a75edcfd0ccf32f59bbafd733 flycast: https://github.com/flyinghead/flycast/pull/1402 PPSSPP: https://github.com/hrydgard/ppsspp/pull/18824 melonDS: https://github.com/melonDS-emu/melonDS/pull/1667
A few weeks ago, i've seen the maintainer of the mame libretro core complaining about that stuff, he couldn't build it with the standard libretro buildbot because it was apparently too outdated.
Is any of those emulators you are talking about available on winxp, 3ds, psvita, wiiu, ps3, ... ? Also, while it does make some sense to worry about this for emulators that read discs at runtime, or load extremely big archives at launch, FBNeo doesn't really do any of that. I don't really see the point of dropping support for multiple platforms, only to shorten already fairly short loading time.
Maybe could consider trying to add for libretro port, which runs more on modern computer and operating systems
Igor Pavlov has written his own zstandard decoder for 7-zip for the reason of supporting old compilers (7-zip itself is compiled with VS2005) The code is not out yet as he does not post code for 7-zip betas, but when it does release it might be worth looking at using that. License might end up being PD or LGPL, depends on what he uses. His LZMA code is PD. zstandard-zip is a decent enough format.
I noticed that zlib was recently updated to the latest version, so maybe could simply use zlibwrapper to get zstd support based on that. https://github.com/facebook/zstd/tree/dev/zlibWrapper
Igor has since released his old-compiler friendly decoder as BSD 3-Clause. https://github.com/ip7z/7zip/blob/main/C/ZstdDec.c
This is an open-source project, feel free to open a PR with those changes after testing them on all platforms. I personally won't go through that trouble to reduce loading times from 0.100s to 0.095s, especially after debugging the compatibility problems that arose from the recent zlib update.
In a recent update, mame added zstd encoding/decoding support for zip and chd. https://github.com/mamedev/mame/commit/05e69b43e9770e16c4bf1c6ca3e585e64c3f6ff9
The compression rate of zstd is between deflate/zlib and lzma,but decompression speed is faster ,somtimes even than direct copying https://mcmilk.de/projects/7-Zip-zstd/dl/compr-v120.png https://mcmilk.de/projects/7-Zip-zstd/dl/decomp-v120.png
Fast decompression means efficiency and low CPU overhead. This benefits all players and low-end devices.