[Plugin] ZipUtility (7zip)

No current plans to personally add other platform support. This is a fully liberal community plugin though, so by all means consider making pull requests when you get your platform working :slight_smile:

Looking online, there appears to be a project that has ported 7zip to Linux, p7zip p7zip download | SourceForge.net. If you manage to make it compile against GitHub - getnamo/7zip-cpp: Fork of SevenZip++ for modern builds. which is the underlying C++ library used in this plugin, then you could expose the build as a static lib (.a) to this plugin and the rest should work as expected (minus Windows API functions, but those have now been extracted from the 7zip core).

Optionally if you wish to use something like GZip, boost has convenient filters to utilize zlib (e.g. https://gist.github.com/yfnick/6ba33efa7ba12e93b148), which you can expose to the engine as a plugin with the correct libraries (something like Can't link zlib(Boost) to the project - Rendering - Epic Developer Community Forums).

Finally the engine source itself contains zlib as a third party source: https://github.com/EpicGames/UnrealEngine/tree/master/Engine/Source/ThirdParty/zlib, but I’ve never had any success loading engine third party libraries not exposed as modules in projects, YMMV.

Looking at the windows utility, I don’t have a function added yet that lists the content of a folder, I should probably add a function for that (made an issue add Windows API folder listing · Issue #3 · getnamo/ZipUtility-Unreal · GitHub).

To look through an archive on the other hand, you should use the list commands (https://github.com/getnamo/ZipUtility-ue4/blob/master/Source/ZipUtility/Public/ZipFileFunctionLibrary.h#L66), which will give you file names without extracting the contents.

Regarding simultaneous actions, that’s sadly a current shortcoming with the way I originally structured the callback interface for this (didn’t originally consider multiple simultaneous unzips/zips, just that they would happen off-thread to not impact game performance). Ideally each unzip operation should wrap it’s callback object into a handler of sort that would contain all the current progress data as well as a reference to it’s thread/etc which would allow for multiple callbacks and a way to control or early terminate certain operations. Probably holding an array of callback handlers as a static variable on https://github.com/getnamo/ZipUtility-ue4/blob/master/Source/ZipUtility/Public/ZipFileFunctionLibrary.h would suffice and then simply removing the handlers after the operations have finished (the lambda threads already auto-delete on completion).

The core functionality of the plugin is all contained within https://github.com/getnamo/ZipUtility-ue4/blob/master/Source/ZipUtility/Private/ZipFileFunctionLibrary.cpp which wraps the underlying C++ library implementation (GitHub - getnamo/7zip-cpp: Fork of SevenZip++ for modern builds.) with UE4 methods.

Having a pull request that would fix this shortcoming would be awesome :).