Radfordhound / HedgeLib

A C++ library and collection of tools that aims to make modding games in the Sonic the Hedgehog franchise easier.
MIT License
88 stars 24 forks source link

HedgeLib++ - CAB Support #43

Open Radfordhound opened 5 years ago

Radfordhound commented 5 years ago

CAB files which contain ar files are are used by Generations PC within PFD files, so we'll obviously want to support this too.

The CAB format itself is well documented by Microsoft, so this much of it shouldn't be hard.

However, in addition to the CAB format, we also need to support its varying types of compression, or at very least, LZX:18 - the type used by Generations PC.

Thankfully, documentation for LZX is also available from Microsoft here, so we shouldn't have to do any cracking ourselves. However, as you can probably tell from the LZX documentation linked above, it's a very complex format that will therefore be difficult to implement proper support for.

I believe there are built-in Windows APIs that we could call upon to do this for us (and I mean more than just calling expand.exe). These would serve fine as a temporary solution, however, for the long-run I'd like to implement these in HedgeLib itself so as to allow for proper Linux support.

We can find an open-source project which supports LZX as well, though we need to keep licensing in-mind if we go this route.