<s>
In	O
computer	B-General_Concept
science	I-General_Concept
and	O
information	O
theory	O
,	O
data	B-Application
differencing	I-Application
or	O
differential	B-Application
compression	I-Application
is	O
producing	O
a	O
technical	O
description	O
of	O
the	O
difference	O
between	O
two	O
sets	O
of	O
data	O
–	O
a	O
source	O
and	O
a	O
target	O
.	O
</s>
<s>
Formally	O
,	O
a	O
data	B-Application
differencing	I-Application
algorithm	O
takes	O
as	O
input	O
source	O
data	O
and	O
target	O
data	O
,	O
and	O
produces	O
difference	O
data	O
such	O
that	O
given	O
the	O
source	O
data	O
and	O
the	O
difference	O
data	O
,	O
one	O
can	O
reconstruct	O
the	O
target	O
data	O
(	O
"	O
patching	O
"	O
the	O
source	O
with	O
the	O
difference	O
to	O
produce	O
the	O
target	O
)	O
.	O
</s>
<s>
One	O
of	O
the	O
best-known	O
examples	O
of	O
data	B-Application
differencing	I-Application
is	O
the	O
diff	B-Application
utility	I-Application
,	O
which	O
produces	O
line-by-line	O
differences	O
of	O
text	B-General_Concept
files	I-General_Concept
(	O
and	O
in	O
some	O
implementations	O
,	O
binary	O
files	O
,	O
thus	O
being	O
a	O
general-purpose	O
differencing	O
tool	O
)	O
.	O
</s>
<s>
Differencing	O
of	O
general	O
binary	O
files	O
goes	O
under	O
the	O
rubric	O
of	O
delta	B-Algorithm
encoding	I-Algorithm
,	O
with	O
a	O
widely	O
used	O
example	O
being	O
the	O
algorithm	O
used	O
in	O
rsync	B-Application
.	O
</s>
<s>
A	O
standardized	O
generic	O
differencing	O
format	O
is	O
VCDIFF	B-Application
,	O
implemented	O
in	O
such	O
utilities	O
as	O
Xdelta	B-Application
version	O
3	O
.	O
</s>
<s>
A	O
high-efficiency	O
(	O
small	O
patch	O
files	O
)	O
differencing	O
program	O
is	O
bsdiff	O
,	O
which	O
uses	O
bzip2	B-Application
as	O
a	O
final	O
compression	O
step	O
on	O
the	O
generated	O
delta	O
.	O
</s>
<s>
Main	O
concerns	O
for	O
data	B-Application
differencing	I-Application
are	O
usability	O
and	O
space	O
efficiency	O
(	O
patch	O
size	O
)	O
.	O
</s>
<s>
An	O
example	O
of	O
this	O
is	O
in	O
diff	B-Application
,	O
which	O
shows	O
which	O
lines	O
changed	O
,	O
and	O
where	O
the	O
context	B-Application
format	I-Application
allows	O
robustness	O
and	O
improves	O
human	O
readability	O
.	O
</s>
<s>
Other	O
concerns	O
include	O
computational	O
efficiency	O
,	O
as	O
for	O
data	B-General_Concept
compression	I-General_Concept
–	O
finding	O
a	O
small	O
patch	O
can	O
be	O
very	O
time	O
and	O
memory	O
intensive	O
.	O
</s>
<s>
Best	O
results	O
occur	O
when	O
one	O
has	O
knowledge	O
of	O
the	O
data	O
being	O
compared	O
and	O
other	O
constraints	O
:	O
diff	B-Application
is	O
designed	O
for	O
line-oriented	O
text	B-General_Concept
files	I-General_Concept
,	O
particularly	O
source	O
code	O
,	O
and	O
works	O
best	O
for	O
these	O
;	O
the	O
rsync	B-Application
algorithm	I-Application
is	O
used	O
based	O
on	O
source	O
and	O
target	O
being	O
across	O
a	O
network	O
from	O
each	O
other	O
and	O
communication	O
being	O
slow	O
,	O
so	O
it	O
minimizes	O
data	O
that	O
must	O
be	O
transmitted	O
;	O
and	O
the	O
updates	O
for	O
Google	B-Application
Chrome	I-Application
use	O
an	O
algorithm	O
customized	O
to	O
the	O
archive	O
and	O
executable	O
format	O
of	O
the	O
program	O
's	O
data	O
.	O
</s>
<s>
Data	B-General_Concept
compression	I-General_Concept
can	O
be	O
seen	O
as	O
a	O
special	O
case	O
of	O
data	B-Application
differencing	I-Application
–	O
data	B-Application
differencing	I-Application
consists	O
of	O
producing	O
a	O
difference	O
given	O
a	O
source	O
and	O
a	O
target	O
,	O
with	O
patching	O
producing	O
a	O
target	O
given	O
a	O
source	O
and	O
a	O
difference	O
,	O
while	O
data	B-General_Concept
compression	I-General_Concept
consists	O
of	O
producing	O
a	O
compressed	O
file	O
given	O
a	O
target	O
,	O
and	O
decompression	O
consists	O
of	O
producing	O
a	O
target	O
given	O
only	O
a	O
compressed	O
file	O
.	O
</s>
<s>
Thus	O
,	O
one	O
can	O
consider	O
data	B-General_Concept
compression	I-General_Concept
as	O
data	B-Application
differencing	I-Application
with	O
empty	O
source	O
data	O
,	O
the	O
compressed	O
file	O
corresponding	O
to	O
a	O
"	O
difference	O
from	O
nothing	O
"	O
.	O
</s>
<s>
This	O
is	O
the	O
same	O
as	O
considering	O
absolute	O
entropy	O
(	O
corresponding	O
to	O
data	B-General_Concept
compression	I-General_Concept
)	O
as	O
a	O
special	O
case	O
of	O
relative	O
entropy	O
(	O
corresponding	O
to	O
data	B-Application
differencing	I-Application
)	O
with	O
no	O
initial	O
data	O
.	O
</s>
<s>
When	O
one	O
wishes	O
to	O
emphasize	O
the	O
connection	O
,	O
one	O
may	O
use	O
the	O
term	O
differential	B-Application
compression	I-Application
to	O
refer	O
to	O
data	B-Application
differencing	I-Application
.	O
</s>
