{"id":20903979,"url":"https://github.com/getnamo/ziputility-unreal","last_synced_at":"2025-04-09T15:06:47.302Z","repository":{"id":47798834,"uuid":"48079273","full_name":"getnamo/ZipUtility-Unreal","owner":"getnamo","description":"Event driven 7zip utility plugin for the Unreal Engine.","archived":false,"fork":false,"pushed_at":"2024-12-05T03:33:47.000Z","size":5204,"stargazers_count":220,"open_issues_count":9,"forks_count":47,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-09T15:06:40.794Z","etag":null,"topics":["7zip","blueprint","ue4","ue5","unreal","zip"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getnamo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-16T01:26:14.000Z","updated_at":"2025-02-28T02:33:47.000Z","dependencies_parsed_at":"2024-11-06T09:43:36.915Z","dependency_job_id":null,"html_url":"https://github.com/getnamo/ZipUtility-Unreal","commit_stats":null,"previous_names":["getnamo/ziputility-ue4"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getnamo%2FZipUtility-Unreal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getnamo%2FZipUtility-Unreal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getnamo%2FZipUtility-Unreal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getnamo%2FZipUtility-Unreal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getnamo","download_url":"https://codeload.github.com/getnamo/ZipUtility-Unreal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055284,"owners_count":21040157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["7zip","blueprint","ue4","ue5","unreal","zip"],"created_at":"2024-11-18T13:15:36.403Z","updated_at":"2025-04-09T15:06:46.383Z","avatar_url":"https://github.com/getnamo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZipUtility Plugin\n\n[![GitHub release](https://img.shields.io/github/release/getnamo/ZipUtility-Unreal.svg)](https://github.com/getnamo/ZipUtility-Unreal/releases)\n[![Github All Releases](https://img.shields.io/github/downloads/getnamo/ZipUtility-Unreal/total.svg)](https://github.com/getnamo/ZipUtility-Unreal/releases)\n\nEvent driven, blueprint accessible flexible 7zip compression, archiver, and file manipulation plugin for the Unreal Engine. Built on [7zip-cpp](https://github.com/getnamo/7zip-cpp) modernization of the [SevenZip++](http://bitbucket.org/cmcnab/sevenzip/wiki/Home) C++ wrapper for accessing the 7-zip COM-like API in 7z.dll and 7za.dll.\n\nSupports the following compression algorithms:\n7Zip, GZip, BZip2, RAR, TAR, ISO, CAB, LZMA, LZMA86.\n\n\nPlugin works in Windows only.\n\n[Main Forum Thread](https://forums.unrealengine.com/showthread.php?95022-Plugin-ZipUtility-(7zip))\n\n\n## Quick Install \u0026 Setup ##\n\n 1.\t[Download](https://github.com/getnamo/ZipUtility-Unreal/releases)\n 2.\tCreate new or choose project.\n 3.\tBrowse to your project folder (typically found at Documents/Unreal Project/{Your Project Root})\n 4.\tCopy *Plugins* folder into your Project root.\n 5.\tRestart the Editor and open your project again. Plugin is now ready to use.\n \n \n### Note on compiling\nIf you're recompiling for e.g. another engine build or packaging you will need to ensure you have ATL installed. \n1. Open Visual Studio Installer -\u003e ```Modify```.\n2. Click on the ```Individual components``` and scroll down to ```Visual C++ ATL for x86 and x64```.\n3. *(Optional)* It's probably a good idea to ensure you have ```Visual C++ MFC for x86 and x64``` included as well.\n4. After installation has completed, the plugin should auto-detect your ATL include location and compile correctly.\n\n## Blueprint Access\n\nRight click anywhere in a desired blueprint to access the plugin Blueprint Function Library methods. The plugin is completely multi-threaded and will not block your game thread, fire and forget.\n\n![Right Click](http://i.imgur.com/ERYn5sM.png)\n\n*Optional but highly recommended:* Add `ZipUtilityInterface` to your blueprint if you wish to be notified of the progress, e.g. when your archive has finished unzipping or if you wish to display a progress bar.\n\n![Add Interface](http://i.imgur.com/9NrpOfm.png)\n\nAfter you've added the interface and hit Compile on your blueprint you'll have access to the Progress and List events\n\n![Events](http://i.imgur.com/fQFtkgA.png)\n\nThey're explained in further detail below.\n\n## Zipping and Compressing Files\n\nTo Zip up a folder or file, right click your event graph and add the `Zip` function.\n\nSpecify a path to a folder or file as a target.\n\nLeave the Compression format to the default SevenZip or specify a format of choice, the plugin automatically appends the default extension based on the compression format. Note that not all compression formats work for compression (e.g. RAR is extract only).\n\n![Zip Function Call](Docs/zip.png)\n\n## Unzipping and Extracting Files\n\nTo Unzip up a file, right click your event graph and add the `Unzip` function.\n\nSpecify the full path to a suitable archive file.\n\nThe plugin automatically detects the compression format used in the archive, but you can alternatively specify a specific format using the `UnzipWithFormat` method.\n\n![Unzip Function Call](Docs/unzip.png)\n\n## Listing Contents in an Archive\n\nTo list files in your archive, right click your event graph and add the `ListFilesInArchive` function.\n\nSpecify the full path to a suitable archive file. This function requires the use of the `ZipUtilityInterface` callback `OnFileFound`, so ensure you have `ZipUtilityInterface` added to your blueprint.\n\n![List Files Function Call](http://i.imgur.com/uqkI2Gn.png)\n\nThe `OnFileFound` event gets called for every file in the archive with its path and size given in bytes. This function does not extract the contents, but instead allows you to inspect files before committing to extracting their contents.\n\n## Events \u0026 Progress Updates\n\nBy right-clicking in your blueprint and adding various `ZipUtility` events, you can get the status of zip/unzip operations as they occur. All callbacks are received on the game thread. To receive callbacks you must satisfy two requirements:\n\n1. Implement the `ZipUtilityInterface` interface in your blueprint from the Class Settings menu\n2. Pass a reference to `self` (or a reference to the class that implements `ZipUtilityInterface`) to all zip/unzip functions\n\nAll events pass along the name of the archive being operated on. Since multiple events can be running in parallel, the archive name is useful to uniquely match events with operations.\n\n### Event Table\n\n| Event  | Details |\n| ------------- | ------------- |\n| `OnStartProcess`  | Called when the zip/unzip operation begins  |\n| `OnProgress`  | Called periodically while a zip/unzip operation is running to provide the overall status of the operation  |\n| `OnFileDone` | Called for every file that is done being zipped/unzipped |\n| `OnDone` | Called when the entire zip/unzip operation has completed |\n| `OnFileFound` | Called for every file that is found as the result of a `ListFilesInArchive` call |\n\n![Progress Updates](Docs/event.png)\n\n## Stopping Operations\n\nMost of the Zip and Unzip methods return a pointer to a `ZipOperation`. This pointer can be used to terminate an operation that is still running by calling the `StopOperation` function.\n\nThe returned pointer to `ZipOperation` will be Garbage Collected if it is not stored as an Object Reference or in C++ in a `UPROPERTY` declared pointer. So don't store `ZipOperation` as a soft reference/pointer. It is safe to completely ignore the returned `ZipOperation` if you do not care about manually terminating the operation.\n\n![Unzip Function Call](Docs/stopoperation.png)\n\n## Convenience File Functions\n\n### Move/Rename a File\n\nSpecify full path for the file you wish to move and it's destination\n\n![Move File](http://i.imgur.com/aPu6gdJ.png)\n\nTo rename it, simply change the destination name\n\n![Rename Folder](http://i.imgur.com/RICA41e.png)\n\n\n### Create/Make Directory\n\n![Make Directory](http://i.imgur.com/8ocCOPF.png)\n\n\n### List Contents of Folder\n\nExpects self to be a `FileListInterface`\n\n![List Contents](http://i.imgur.com/PPhyxFE.png)\n\n## C++\n\n### Setup\n\nTo use the C++ code from the plugin add it as a dependency module in your project build.cs e.g.\n\n```c#\nPublicDependencyModuleNames.AddRange(new string[] { \"Core\", \"CoreUObject\", \"Engine\", \"InputCore\", \"ZipUtility\"});\n```\n\nthen ```#include \"ZipFileFunctionLibrary.h\"``` in the places where you'd like to use the plugin functionality.\n\n### [Lambda](http://en.cppreference.com/w/cpp/language/lambda)\n\n#### [UnzipWithLambda](https://github.com/getnamo/ZipUtility-Unreal/blob/master/Source/ZipUtility/Public/ZipFileFunctionLibrary.h#L63)\n\ncall the static function with *done* and *progress* callback lambdas e.g. if you're interested in both\n\n```c++\nUZipFileFunctionLibrary::UnzipWithLambda(FString(\"C:/path/to/your/zip.7z\"),\n    []()\n    {\n         //Called when done\n    },\n    [](float Percent)\n    {\n         //called when progress updates with % done\n    });\n```\n\nreplace either with nullptr if you're not interested in that callback\n\n#### [ZipWithLambda](https://github.com/getnamo/ZipUtility-Unreal/blob/master/Source/ZipUtility/Public/ZipFileFunctionLibrary.h#L80)\n\ncall the static function with *done* and *progress* callback lambdas e.g. if you're interested in both\n\n```c++\nUZipFileFunctionLibrary::ZipWithLambda(FString(\"C:/path/to/your/zip.7z\"),\n    []()\n    {\n         //Called when done\n    },\n    [](float Percent)\n    {\n         //called when progress updates with % done\n    });\n```\n\nreplace either with nullptr if you're not interested in that callback\n\n### Your own class with [IZipUtilityInterface](https://github.com/getnamo/ZipUtility-Unreal/blob/master/Source/ZipUtility/Public/ZipUtilityInterface.h)\n\nLet's say you have a class called `UMyClass`. You then add the `IZipUtilityInterface` to it via multiple inheritance e.g.\n\n```c++\nclass UMyClass : public UObject, public IZipUtilityInterface\n{\n   GENERATED_BODY()\n   ...\n};\n```\n\nBecause the events are of the type [BlueprintNativeEvent](https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Reference/Functions/Specifiers/BlueprintNativeEvent/) you add the C++ implementation of the events like so\n\n```c++\nclass UMyClass : public UObject, public IZipUtilityInterface\n{\n    GENERATED_BODY()\n    ...\n\n    //event overrides\n    virtual void OnProgress_Implementation(const FString\u0026 archive, float percentage, int32 bytes) override;\n    virtual void OnDone_Implementation(const FString\u0026 archive, EZipUtilityCompletionState CompletionState) override;\n    virtual void OnStartProcess_Implementation(const FString\u0026 archive, int32 bytes) override;\n    virtual void OnFileDone_Implementation(const FString\u0026 archive, const FString\u0026 file) override;\n    virtual void OnFileFound_Implementation(const FString\u0026 archive, const FString\u0026 file, int32 size) override;\n};\n```\n\nensure you have at least an empty implementation for each function\n\n```c++\nvoid UMyClass::OnProgress_Implementation(const FString\u0026 archive, float percentage, int32 bytes)\n{\n    //your code here\n}\n```\n\nTo call a `ZipUtility` function you first get a valid pointer to your class (I leave that up to you) e.g.\n\n```c++\nUMyClass* MyZipClass = NewObject\u003cUMyClass\u003e(); //or you may already have a valid pointer from allocating elsewhere\n```\n\nthen to e.g. unzip you pass the pointer to your class with the `IZipUtilityInterface` as your second parameter (and if you use them, any other optional parameters such as compression format). If you are calling the zip functions from within the class that implements `IZipUtilityInterface` then you can simply pass `this`:\n\n```c++\nUZipFileFunctionLibrary::Unzip(FString(\"C:/path/to/your/zip.7z\"), MyZipClass);\n```\n\nSee [ZipFileFunctionLibrary.h](https://github.com/getnamo/ZipUtility-Unreal/blob/master/Source/ZipUtility/Public/ZipFileFunctionLibrary.h) for all the function signatures.\n\nSee [ZULambdaDelegate.h](https://github.com/getnamo/ZipUtility-Unreal/blob/master/Source/ZipUtility/Private/ZULambdaDelegate.h) for an example class using the above setup to convert `IZipUtilityInterface` interface calls into lambda functions.\n\n\n### Windows Utility\n\nFor windows utility functions, the callback setup is similar, kindly refer to [WindowsFileUtilityFunctionLibrary.h](https://github.com/getnamo/ZipUtility-Unreal/blob/master/Source/WindowsUtility/Public/WindowsFileUtilityFunctionLibrary.h) which may use [IWFUFileListInterface](https://github.com/getnamo/ZipUtility-Unreal/blob/master/Source/WindowsUtility/Public/WFUFileListInterface.h) or [IWFUFolderWatchInterface](https://github.com/getnamo/ZipUtility-Unreal/blob/master/Source/WindowsUtility/Public/WFUFolderWatchInterface.h) depending on functions used.\n\n## License\n\nMIT for ZipUtility and 7z-cpp\n\nLGPL for 7za.dll, LGPL + Unrar for 7z.dll\n\nSee license file for details.\n\n## Help\nAdd any issues you run across to https://github.com/getnamo/ZipUtility-Unreal/issues\n\nor post to the [unreal forum thread](https://forums.unrealengine.com/showthread.php?95022-Plugin-ZipUtility-(7zip)).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetnamo%2Fziputility-unreal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetnamo%2Fziputility-unreal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetnamo%2Fziputility-unreal/lists"}