sisong / HDiffPatch

a C\C++ library and command-line tools for Diff & Patch between binary files or directories(folder); cross-platform; runs fast; create small delta/differential; support large files and limit memory requires when diff & patch.
Other
1.54k stars 283 forks source link

Proposal:SplitDiffData #398

Open SysVR opened 2 days ago

SysVR commented 2 days ago

Proposal: Splitting at the specified size during patch generation: A separate plain text index file will be generated. “File name and extension are free to choose.” The mechanism allows for patching the split data by reading the index file during patch application. Additionally, if the size exceeds 4GB during SFX, it will be possible to automatically split into two parts. The index file used for patching will include:

File name, Checksum data, File size The file name part can specify the hierarchy from relative paths or absolute paths.

Example:

patch.diff,E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855,1234567890 core\patch.diff,E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855,1234567890 D:\update\core\patch.diff,E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855,1234567890 \update\core\patch.diff,E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855,1234567890 \localhost\D$\update\core\patch.diff,E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855,1234567890

sisong commented 1 day ago

In what scenarios would you use this feature?
I probably wouldn't have included it in the development plan.

If you need this feature, consider doing it yourself: the patch function supports diffFile as an input stream, and you can abstract multiple files into an input stream by yourself.