Navigation
API > API/Plugins > API/Plugins/DMXZip
Zip reader/writer for DMX specific Zip Files such as MVR and GDTF.
Example of use: bool DoStuffWithZip(const FString& ZipFileName) { FDMXZipper Zipper; Zipper.LoadFromFile(ZipFileName);
Zipper.AddFile("hello/world", { 'A', 'B', 'C' }); Zipper.AddFile("test001", { '0', '1', '2', '3', 'X' }, false); Zipper.AddFile("a/b/c/d/e/test002", { 80, 90, 100, 110, 111, 112, 113 });
TArray64
if (!Zipper.SaveToFile(ZipFileName)) { return false; }
return true; }
| Name | FDMXZipper |
| Type | class |
| Header File | /Engine/Plugins/VirtualProduction/DMX/DMXGDTF/Source/DMXZip/Public/DMXZipper.h |
| Include Path | #include "DMXZipper.h" |
Syntax
class FDMXZipper : public TSharedFromThis< FDMXZipper >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FDMXZipper
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDMXZipper() |
Constructor | DMXZipper.h |
Structs
| Name | Remarks |
|---|---|
| FDMXScopedUnzipToTempFile | Helper to unzip a file within the zip as temp file. Deletes the file when running out of scope. |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Adds a file to the Zip at its Relative File Path and Name. | DMXZipper.h | ||
bool GetData
(
TArray64< uint8 >& OutData |
Gets the zip as data. Returns true on success | DMXZipper.h | |
bool GetFileContent
(
const FString& Filename, |
Gets the Data of a File in the Zip | DMXZipper.h | |
| Returns the File Names in the Zip. Note, may contain relative paths | DMXZipper.h | ||
bool LoadFromData
(
const TArray64< uint8 >& Data |
Loads the data as zip file | DMXZipper.h | |
bool LoadFromFile
(
const FString& Filename |
Loads the specified zip file | DMXZipper.h | |
bool SaveToFile
(
const FString& Filename |
Saves the zip to specified Filename | DMXZipper.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddEndOfCentralDirectory
(
FArrayWriter& Writer |
Adds an End of Central Directory entry to the zip | DMXZipper.h | |
bool AddFileInternal
(
FArrayWriter& Writer, |
Writes a zipped File to the array writer | DMXZipper.h | |
bool Parse() |
Parses the Zip File | DMXZipper.h |