我是新尝试阅读此类文档的新手,我对 VCDIFF 的说明如何工作感到困惑,这是原始文档:
https://www.rfc-editor.org/rfc/rfc3284
这部分:
ADD: This instruction has two arguments, a size x and a sequence
of x bytes to be copied.
COPY: This instruction has two arguments, a size x and an address
p in the string U. The arguments specify the substring of U
that must be copied. We shall assert that such a substring
must be entirely contained in either S or T.
RUN: This instruction has two arguments, a size x and a byte b,
that will be repeated x times.
现在文档举了一个例子:
a b c d e f g h i j k l m n o p
a b c d w x y z e f g h e f g h e f g h e f g h z z z z
COPY 4, 0
ADD 4, w x y z
COPY 4, 4
COPY 12, 24
RUN 4, z
我不明白每个操作都做了什么,我认为第一个副本是第一个“abc d”,添加现在包括“wxy z”,现在我不太明白接下来的两个副本是如何工作的。
如果我认为如果有人可以显示该指令的用途会很有用,例如“此指令有这个字符串作为结果,下一个这个”,只是为了可以逐步比较:D
谢谢。