二进制diff和补丁程序的虚拟机映像 [英] Binary diff and patch utility for a virtual machine image

查看:242
本文介绍了二进制diff和补丁程序的虚拟机映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要相当频繁释放出一些软件,而该软件包含作为VMware的磁盘文件,即的.vmdk 文件。
我要的是某种二进制diff和补丁程序,使三角洲产生尽可能小。

I need to release some software quite frequently, and the software is contained as a VMWare disk file, i.e., .vmdk file. What I want is some kind of binary diff and patch utility to make the delta generated as small as possible.

推荐答案

让我开始了与尝试和真正的方法,然后指出了一些较新的方法。

Let me start off with tried-and-true approaches, then point out some more recent approaches.

接近我所看到的二进制文件的工作

很久以前,人们扩大了老的二进制文件的新版本进入暂时的文本文件(每个字节扩展到3个字节:2进制数字和一个换行符)。
然后通过一个旧版本的差异(即绝对不能处理的二进制文件)的运行这两个文本文件,使补丁文件。
然后,我们在传播的尚未8位安全通信线路的文本补丁文件。
在接收端,一是扩大了旧的二进制文件到临时文本版本,那么修补旧的文本文件,然后COM pressed新的文本文件重新导入一个二进制文件(COM pressing每对十六进制数字成一个字节,扔掉换行,并可能已悄悄在任何回车)。

A long time ago, people expanded the old and the new versions of a binary file into temporary "text" files (every byte expanded to 3 bytes: 2 hex digits and a newline). Then run these two "text" files through an old version of "diff" (that definitely couldn't handle binary files) to make a patch file. Then we transmitted that "text" patch file over communication lines that were not yet 8-bit-clean. On the receive end, one expanded the old binary file into a temporary text version, then patched that old text file, and then compressed the new text file back into a binary file (compressing each pair of hex digits into one byte, and throwing away the newlines and any carriage returns that might have crept in).

最近,我一直在使用 rsync的(或某些工具建立在它之上,如齐奏)。
它能够处理任意的二进制文件就好了。
我一般做一个实时更新,与我的本地机器上运行齐奏和文件服务器上运行的rsync,谈来谈去给对方。

More recently, I have been using rsync (or some utility built on top of it such as Unison). It handles arbitrary binary files just fine. I generally do a live update, with Unison running on my local machine and rsync running on the file server, talking back and forth to each other.

不管是如何产生的补丁文件,你可以使用任何数据COM pression实用工具COM preSS该文件。

No matter how a patch file is generated, you can use any data compression utility to compress that file.

办法是,据我所知,应该用二进制文件的工作

<一个href=\"http://stackoverflow.com/questions/2415127/how-to-crate-a-patch-file-for-the-binary-difference-output-file\">StackOverflow: 如何为箱二进制差异输出文件补丁文件
建议使用 bsdiff

另一个<一个href=\"http://stackoverflow.com/questions/777949/can-i-make-git-recognize-a-utf-16-file-as-text\">StackOverflow问题意味着vimdiff同样似乎充分地处理任意字节。

Another StackOverflow question implies that "vimdiff" seems to handle arbitrary bytes adequately.

<一个href=\"http://stackoverflow.com/questions/3707962/useful-binary-diff-tool-other-than-msdnapatch-and-mpatch-xdelta-bsdiff-vbin\">StackOverflow: 有用的二进制比较工具提到了其他一些二进制差异的工具。

StackOverflow: "Useful Binary Diff Tool" mentions a few other binary difference tools.

我听到了基于rsync的一些工具 - rdiff进行和rdiff进行备份和表里不一 - 允许你创建了一个补丁文件。
那么谁收到补丁文件的人可以用它来更新自己的旧二进制文件到一个新的二进制文件。

I hear that some tools based on rsync -- "rdiff" and "rdiff-backup" and "duplicity" -- allow you create a patch file. Then a person who receives that patch file can use it to update their old binary file to a new binary file.

声称,近期标准的差异和补丁实用工具版本支持二进制文件。
你有没有试过?

The Wikipedia claims that recent versions of the standard "diff" and "patch" utilities support binary files. Have you tried that?

在可执行文件COM pression 前沿研究

cutting-edge research in executable file compression

如果您有兴趣的前沿研究上做增量文件尽可能小更新可执行文件时,你会想看看
胡瓜的工作原理
由斯蒂芬·亚当斯在2009年的铬项目。

If you are interested in cutting-edge research on making the delta file as small as possible when updating executable files, you'll want to check out "How Courgette works" by Stephen Adams 2009 at The Chromium Projects.

在其他方面,接收该补丁的电脑拆卸旧的应用程序,将所有绝对地址和偏移量为符号;然后修补拆解code;然后重新组合的修补code到应用程序的新版本。

Among other things, the computer that receives the patch "disassembles" the old application, converting all absolute addresses and offsets into symbols; then patches the disassembled code; then "reassembles" the patched code into the new version of the application.

这篇关于二进制diff和补丁程序的虚拟机映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆