A tool to generate hdiff update files between two versions of an Anime Game. This tool replicates the official patch structure. Output is 1:1 identical to miHoYo’s format, but with improved compression. Unlike miHoYo’s use of ZIP, this tool utilizes 7z and hdiffz.exe with ultra compression settings, producing smaller and more efficient patch files with 100% full compatibility.
- Compares two full game folders (old & new)
- Outputs clean
.hdiff.7zupdate files - Sequential or parallel diffing
- Multithreaded (configurable)
- Strict version checks
- Full logging
/your-root-folder/
├── GenshinImpact_6.0.0/ ← Old version folder
├── GenshinImpact_6.1.0/ ← New version folder
├── hdiffbuilder.exe ← Main executable
├── config.json ← Execution config
├── game_6.0.0_6.1.0_hdiff.7z ← Patch output
├── audio_en-us_6.0.0_6.1.0_hdiff.7z ← Patch output
├── audio_ja-jp_6.0.0_6.1.0_hdiff.7z ← Patch output
├── audio_ko-kr_6.0.0_6.1.0_hdiff.7z ← Patch output
├── audio_zh-cn_6.0.0_6.1.0_hdiff.7z ← Patch output
└── BeyondAssets_OS_6.1.0.7z ← Patch output
Also, you can use YuanShen.
{
"old_ver": "6.0.0",
"new_ver": "6.1.0",
"mode": 0,
"max_threads": 4,
"keep_source_folder": true,
"aggressive_mode": true,
"log_level": "DEBUG",
"game": true,
"audio_en-us": true,
"audio_ja-jp": true,
"audio_ko-kr": true,
"audio_zh-cn": true
}
| Parameter | Type | Description |
|---|---|---|
old_ver |
string | Old version (folder must exist, e.g. GenshinImpact_6.0.0) |
new_ver |
string | New version (folder must exist, e.g. GenshinImpact_6.1.0) |
mode |
int | 0 = sequential execution, 1 = parallel execution |
max_threads |
int | Maximum worker threads (1 to number of CPU cores) |
keep_source_folder |
bool | If true, retains original version folders after patching |
aggressive_mode |
bool | If true, process diffing the entire contents of game, not only AudioAssets |
log_level |
string | One of: "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "NONE" |
game |
bool | If true, perform diffing for main game files |
audio_en-us |
bool | If true, include English audio in the diff |
audio_ja-jp |
bool | If true, include Japanese audio in the diff |
audio_ko-kr |
bool | If true, include Korean audio in the diff |
audio_zh-cn |
bool | If true, include Chinese audio in the diff |
If the config is missing, it will be created automatically with safe defaults.
If the config is malformed or contains invalid values, the program will terminate with an error and hint.
- Place
hdiffbuilder.exein the same folder as both game versions. - Edit
config.jsonwith correct versions. - Run the EXE directly.
- Output
.hdiff.7zfiles will be generated in the same directory.
- Install .NET 9.0 SDK
- Run
compile.bat - Output will be in
bin/hdiffbuilder.exe
This tool is for reverse engineering & educational use only.
Not affiliated with miHoYo, Cognosphere, or any official entity.
Do not use this project for public distribution or commercial purposes.