Navigation
API > API/Plugins > API/Plugins/DMXZip
Inheritance Hierarchy
- FSharedFromThisBase
- TSharedFromThis
- FDMXZipper
References
| Module | DMXZip |
| Header | /Engine/Plugins/VirtualProduction/DMX/DMXGDTF/Source/DMXZip/Public/DMXZipper.h |
| Include | #include "DMXZipper.h" |
Syntax
class FDMXZipper : public TSharedFromThis< FDMXZipper >
Remarks
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; }
Variables
| Type | Name | Description | |
|---|---|---|---|
| TMap< FString, TPair< TArray64< uint8 >, bool > > | NewFilesToShouldCompressMap | Map of Files added to the Zip | |
| uint32 | OffsetOfCentralDirectory | The Offset of the Central Directory | |
| TMap< FString, uint32 > | OffsetsMap | Map of File Names and their Offset | |
| FArrayReader | Reader | Array reader handling the data | |
| uint32 | SizeOfCentralDirectory | The Size of the Central Directory | |
| uint16 | TotalNumberOfCentralDirectoryRecords | The total number of Central Directory records |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FDMXZipper () |
Constructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddEndOfCentralDirectory
(
FArrayWriter& Writer |
Adds an End of Central Directory entry to the zip | |
| void | Adds a file to the Zip at its Relative File Path and Name. | ||
| bool | AddFileInternal
(
FArrayWriter& Writer, |
Writes a zipped File to the array writer | |
| bool | Gets the zip as data. Returns true on success | ||
| bool | GetFileContent
(
const FString& Filename, |
Gets the Data of a File in the Zip | |
| TArray< FString > | GetFiles () |
Returns the File Names in the Zip. Note, may contain relative paths | |
| bool | LoadFromData
(
const TArray64< uint8 >& Data |
Loads the data as zip file | |
| bool | LoadFromFile
(
const FString& Filename |
Loads the specified zip file | |
| bool | Parse () |
Parses the Zip File | |
| bool | SaveToFile
(
const FString& Filename |
Saves the zip to specified Filename |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FDMXScopedUnzipToTempFile | Helper to unzip a file within the zip as temp file. Deletes the file when running out of scope. |