stormlibsharp icon indicating copy to clipboard operation
stormlibsharp copied to clipboard

Added MPQ Compression support via AddFileFromDiskWithCompression

Open HelloKitty opened this issue 7 years ago • 3 comments

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.

HelloKitty avatar Jun 19 '18 23:06 HelloKitty

@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 avatar Mar 27 '20 18:03 stoneharry

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

HelloKitty avatar Apr 01 '20 09:04 HelloKitty

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!

stoneharry avatar Apr 01 '20 15:04 stoneharry