libretro/RetroArch — pull request #923 by timostrunk (2014-09-02 16:12:40+00:00)
Title: Compressed file support

This Pull Request adds compressed file support for 7z archives for cases, where fullpath and blockaccess is not required (i.e. most 'single' gameimage emulators like SNES, MD, etc.)

I tested it on Windows and Linux using the bsnes implementation of libretro. Those two Makefiles are updated. Linux needs a configure run for the variable.

To test it, create a 7z archive with a ROM:
For example:
testarchive.7z containing the file rom.smc

Then start retroarch with the following commandline:

./retroarch -z testarchive.7z -L bsnes-libretro.so testarchive.7z/rom.smc

The rom will be extracted in-memory similar to the default read_file API and the game starts.
To disable it in the standard build, redefine HAVE_7ZIP.

Issues:
Directories inside the 7z archive are not yet supported
It works only on the main content.
Currently it's available only on the commandline.

Things, which might not be liked:
I included a small subset of the lzma sdk in the decompress subfolder. It is completely GPL-compatible (it's in the public domain), but depending on the preferences of the RetroArch team, this might be preferred out-of-tree.

Next steps, if the pull is accepted
- I will add a compressed directory listing to the default GUI (ETA: next weekend)
- Same for phoenix-gui
- I structured everything modular, I will add .zipfile support, if requested.
- rar support will never be possible due to license issues.
- I could also modify more Makefiles. The lzma sdk is quite portable and should compile on most archs without issues.