### Add Dependency Source: https://github.com/yuzhiqiang1993/bsdiff/blob/main/README.md Include the library in your project's build configuration. ```gradle implementation "com.xeonyu:bsdiff:1.0.4" ``` -------------------------------- ### Generate Patch File Source: https://github.com/yuzhiqiang1993/bsdiff/blob/main/README.md Create a binary patch between an old and new file. This is a time-consuming operation and should be executed on a background thread. ```kotlin /*生成补丁包,耗时操作,记得放在子线程 返回值 0表示成功*/ val result = BsDiffTool.diff( newFile.absolutePath,//新文件path oldFile.absolutePath,//旧文件path patchFile.absolutePath//补丁文件path ) ``` -------------------------------- ### Apply Patch File Source: https://github.com/yuzhiqiang1993/bsdiff/blob/main/README.md Merge a patch file with an old file to produce the new file. This is a time-consuming operation and should be executed on a background thread. ```kotlin /*合并补丁包,耗时操作,记得放在子线程 返回值 0表示成功*/ val result = BsDiffTool.patch( oldFile.absolutePath, patchFile.absolutePath, combineFile.absolutePath ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.