存档器
Archiver是用于数据存档的工具,该工具处理UNG文件。它实现加密以避免未经授权的数据访问。
UNG文件对引擎是透明的,并且其内容被视为未打包。有关文件打包的更多详细信息,请参见
文件系统。
To invoke Archiver, run <UnigineSDK>/bin/ung_x64.exe (in Windows) or <UnigineSDK>/bin/ung_x64 (in Linux) from a command-line console.要调用Archiver,请从命令行控制台运行<UnigineSDK>/bin/ung_x64.exe(在Windows中)或<UnigineSDK>/bin/ung_x64(在Linux中)。
Command Line Options命令行选项#
Archiver recognizes the following command-line options:存档器可识别以下命令行选项:
- -p PASSWORD —设置密码。它应该与C ++端在引擎初始化时传递的密码相同。注意You can skip password setting if it is not required. The engine supports loading UNG packages without password protection even if the password was specified on its initialization.如果不需要,可以跳过密码设置。即使在初始化时指定了密码,该引擎也支持加载没有密码保护的UNG软件包。
- -x FILE —将指定文件从打包文件中排除。
- -o NAME —命名输出档案。
- -e NAME —从存档中提取文件。
- -i NAME — print archive statistics.
- -c COMPRESSION_TYPE-设置压缩类型。可以使用以下压缩类型:
- none-不压缩。
- speed - fast performance (LZ4).
- size-最佳压缩(ZLIB)。默认情况下使用此选项。
Usage Examples使用范例#
下面创建了一个名为files.ung的档案,其中包含使用LZ4压缩的文件file.txt和file.tga:
ung_x64 -c speed -o files.ung file.txt file.tga
The following extracts all files from the archive created above:下面的代码从上面创建的档案中提取所有文件:
ung_x64 -e files.ung
The following prints statistics related to the archive:以下显示与档案有关的统计信息:
ung_x64 -i files.ung
The following creates an archive named files.ung that contains files file.txt and file.tga protected with a password "12345":下面创建了一个名为files.ung的存档,其中包含文件file.txt和file.tga,这些文件受密码“ 12345 ”保护:
ung_x64 -p 12345 -o files.ung file.txt file.tga
本页面上的信息适用于 UNIGINE 2.20 SDK.