存档器
Archiver is a tool for data archiving, which handles UNG files. It implements encrypting to avoid unauthorized data access.
UNG files are transparent to the engine, and their content is handled as not packed. For more details about file packing, see
File System. 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 — set a password. It should be the same password as passed on engine initialization on the C++ side. 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.-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.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.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 — exclude the specified files from packaging into the archive. -x FILE —将指定文件从打包文件中排除。
- -o NAME — name the output archive. -o NAME —命名输出档案。
- -e NAME — extract files from the archive. -e NAME —从存档中提取文件。
- -i NAME — print archive statistics. -i NAME — print archive statistics.
- -c COMPRESSION_TYPE — set compression type. The following compression types are available:
- none - no compression.none - no compression.
- speed - fast performance (LZ4).speed - fast performance (LZ4).
- size - best compression (ZLIB). This option is used by default.size - best compression (ZLIB). This option is used by default.
- none - no compression. none-不压缩。
- speed - fast performance (LZ4). speed - fast performance (LZ4).
- size - best compression (ZLIB). This option is used by default. size-最佳压缩(ZLIB)。默认情况下使用此选项。
Usage Examples使用范例#
The following creates an archive named files.ung that contains files file.txt and file.tga using LZ4 compression:下面创建了一个名为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