本文介绍了如何为二进制差异输出文件创建PATCH文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何通过比较两个二进制文件来为差异文件创建PATCH.$ cmp -l>输出文件名

I want to know how to create a PATCH for the difference file I got by comparing two binary files.$cmp -l > output file name

我检查了文本文件'diff'可用于比较和生成PATCH文件$ diff -u oldFile newFile> mods.diff#-u告诉diff输出统一的diff格式

I checked for text files 'diff" can be used to compare and generate a PATCH file$ diff -u oldFile newFile > mods.diff # -u tells diff to output unified diff format

我想在旧的二进制映像文件上应用PATCH,以获取新的二进制映像文件.

I want to apply the PATCH on the old binary image file to get my new binary image file.

推荐答案

Diff和Patch设计用于文本文件,而不是任意二进制数据.您应该改用 bsdiff 之类的东西.

Diff and Patch are designed to work with text files, not arbitrary binary data. You should use something like bsdiff instead.

这篇关于如何为二进制差异输出文件创建PATCH文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 00:18