Added MPQ Compression support via AddFileFromDiskWithCompression
Internally it calls the original unreferenced stormlib binding SFileAddFileEx. With SFileAddFileFlags.MPQ_FILE_COMPRESS set and the provided MpqCompressionTypeFlags from the method parameter list.
This is a pretty important feature for production. Without this feature it is not reasonable to use this Stormlib library to construct MPQs, the sizes will be too large.
Thanks again to Sundays for explaining MPQ compression and pointing me in the right direction.
@robpaveza Any chance we can get this and #1 merged? :)
I guess I can fork this repository and merge the two pull requests into my fork, but it would be nice if I could reference this repository directly.
@stoneharry I had hoped they would merge these PRs but it's been a couple years. Alternatively, we can fork it and publish a version of this on Nuget for us to reference if you'd think that'd be best. I don't have plans to extend things further but if we ever need to it might be beneficial.
Your fixes provided all the functionality I wanted, @HelloKitty 😄 I cannot think of another reason to extend it right now. I'm only using this library as I'm working with legacy MPQ's - CASC has replaced MPQ in all the modern games.
I ended up forking this and referencing it as a submodule in my repo. Thanks!