<s>
Delta	B-Algorithm
encoding	I-Algorithm
is	O
a	O
way	O
of	O
storing	O
or	O
transmitting	O
data	O
in	O
the	O
form	O
of	O
differences	B-Application
(	O
deltas	O
)	O
between	O
sequential	O
data	O
rather	O
than	O
complete	O
files	O
;	O
more	O
generally	O
this	O
is	O
known	O
as	O
data	B-Application
differencing	I-Application
.	O
</s>
<s>
Delta	B-Algorithm
encoding	I-Algorithm
is	O
sometimes	O
called	O
delta	B-Algorithm
compression	I-Algorithm
,	O
particularly	O
where	O
archival	O
histories	O
of	O
changes	O
are	O
required	O
(	O
e.g.	O
,	O
in	O
revision	B-Architecture
control	I-Architecture
software	I-Architecture
)	O
.	O
</s>
<s>
The	O
differences	B-Application
are	O
recorded	O
in	O
discrete	O
files	O
called	O
"	O
deltas	O
"	O
or	O
"	O
diffs	O
"	O
.	O
</s>
<s>
In	O
situations	O
where	O
differences	B-Application
are	O
small	O
–	O
for	O
example	O
,	O
the	O
change	O
of	O
a	O
few	O
words	O
in	O
a	O
large	O
document	O
or	O
the	O
change	O
of	O
a	O
few	O
records	O
in	O
a	O
large	O
table	O
–	O
delta	B-Algorithm
encoding	I-Algorithm
greatly	O
reduces	O
data	O
redundancy	O
.	O
</s>
<s>
Perhaps	O
the	O
simplest	O
example	O
is	O
storing	O
values	O
of	O
bytes	O
as	O
differences	B-Application
(	O
deltas	O
)	O
between	O
sequential	O
values	O
,	O
rather	O
than	O
the	O
values	O
themselves	O
.	O
</s>
<s>
This	O
reduces	O
the	O
variance	O
(	O
range	O
)	O
of	O
the	O
values	O
when	O
neighbor	O
samples	B-Algorithm
are	O
correlated	O
,	O
enabling	O
a	O
lower	O
bit	O
usage	O
for	O
the	O
same	O
data	O
.	O
</s>
<s>
IFF	B-Device
8SVX	B-Operating_System
sound	O
format	O
applies	O
this	O
encoding	O
to	O
raw	O
sound	O
data	O
before	O
applying	O
compression	O
to	O
it	O
.	O
</s>
<s>
Not	O
even	O
all	O
8-bit	O
sound	O
samples	B-Algorithm
compress	O
better	O
when	O
delta	O
encoded	O
,	O
and	O
the	O
usability	O
of	O
delta	B-Algorithm
encoding	I-Algorithm
is	O
even	O
smaller	O
for	O
16-bit	O
and	O
better	O
samples	B-Algorithm
.	O
</s>
<s>
However	O
,	O
in	O
video	O
compression	O
,	O
delta	O
frames	O
can	O
considerably	O
reduce	O
frame	O
size	O
and	O
are	O
used	O
in	O
virtually	O
every	O
video	O
compression	O
codec	B-General_Concept
.	O
</s>
<s>
A	O
directed	O
delta	O
,	O
also	O
called	O
a	O
change	O
,	O
is	O
a	O
sequence	O
of	O
(	O
elementary	O
)	O
change	O
operations	O
which	O
,	O
when	O
applied	O
to	O
one	O
version	O
,	O
yields	O
another	O
version	O
(	O
note	O
the	O
correspondence	O
to	O
transaction	B-General_Concept
logs	I-General_Concept
in	O
databases	O
)	O
.	O
</s>
<s>
A	O
variation	O
of	O
delta	B-Algorithm
encoding	I-Algorithm
which	O
encodes	O
differences	B-Application
between	O
the	O
prefixes	O
or	O
suffixes	O
of	O
strings	O
is	O
called	O
incremental	B-Data_Structure
encoding	I-Data_Structure
.	O
</s>
<s>
It	O
is	O
particularly	O
effective	O
for	O
sorted	O
lists	O
with	O
small	O
differences	B-Application
between	O
strings	O
,	O
such	O
as	O
a	O
list	O
of	O
words	O
from	O
a	O
dictionary	B-Operating_System
.	O
</s>
<s>
Delta	B-Algorithm
encoding	I-Algorithm
performs	O
best	O
when	O
data	O
has	O
small	O
or	O
constant	O
variation	O
;	O
for	O
an	O
unsorted	O
data	O
set	O
,	O
there	O
may	O
be	O
little	O
to	O
no	O
compression	O
possible	O
with	O
this	O
method	O
.	O
</s>
<s>
In	O
delta	O
encoded	O
transmission	O
over	O
a	O
network	O
where	O
only	O
a	O
single	O
copy	O
of	O
the	O
file	O
is	O
available	O
at	O
each	O
end	O
of	O
the	O
communication	O
channel	O
,	O
special	O
error	B-Error_Name
control	I-Error_Name
codes	I-Error_Name
are	O
used	O
to	O
detect	O
which	O
parts	O
of	O
the	O
file	O
have	O
changed	O
since	O
its	O
previous	O
version	O
.	O
</s>
<s>
For	O
example	O
,	O
rsync	B-Application
uses	O
a	O
rolling	O
checksum	B-Algorithm
algorithm	O
based	O
on	O
Mark	O
Adler	O
's	O
adler-32	B-Algorithm
checksum	B-Algorithm
.	O
</s>
<s>
The	O
following	O
C	B-Language
code	O
performs	O
a	O
simple	O
form	O
of	O
delta	B-Algorithm
encoding	I-Algorithm
and	O
decoding	O
on	O
a	O
sequence	O
of	O
characters	O
:	O
</s>
<s>
Another	O
instance	O
of	O
use	O
of	O
delta	B-Algorithm
encoding	I-Algorithm
is	O
,	O
"	O
Delta	B-Algorithm
encoding	I-Algorithm
in	O
HTTP	B-Protocol
"	O
,	O
which	O
proposes	O
that	O
HTTP	B-Protocol
servers	O
should	O
be	O
able	O
to	O
send	O
updated	O
Web	O
pages	O
in	O
the	O
form	O
of	O
differences	B-Application
between	O
versions	O
(	O
deltas	O
)	O
,	O
which	O
should	O
decrease	O
Internet	O
traffic	O
,	O
as	O
most	O
pages	O
change	O
slowly	O
over	O
time	O
,	O
rather	O
than	O
being	O
completely	O
rewritten	O
repeatedly	O
:	O
</s>
<s>
The	O
suggested	O
rsync-based	O
framework	O
was	O
implemented	O
in	O
the	O
rproxy	O
system	O
as	O
a	O
pair	O
of	O
HTTP	B-Protocol
proxies	O
.	O
</s>
<s>
It	O
is	O
usually	O
used	O
in	O
backup	B-Protocol
or	O
file	B-Application
copying	I-Application
software	O
,	O
often	O
to	O
save	O
bandwidth	O
when	O
copying	O
between	O
computers	O
over	O
a	O
private	O
network	O
or	O
the	O
internet	O
.	O
</s>
<s>
One	O
notable	O
open-source	O
example	O
is	O
rsync	B-Application
.	O
</s>
<s>
Many	O
of	O
the	O
online	B-General_Concept
backup	I-General_Concept
services	I-General_Concept
adopt	O
this	O
methodology	O
,	O
often	O
known	O
simply	O
as	O
deltas	O
,	O
in	O
order	O
to	O
give	O
their	O
users	O
previous	O
versions	O
of	O
the	O
same	O
file	O
from	O
previous	O
backups	B-Protocol
.	O
</s>
<s>
Two	O
formats	O
used	O
for	O
software	O
patches	B-Application
,	O
context	O
and	O
unified	O
,	O
provides	O
additional	O
context	O
lines	O
that	O
allow	O
for	O
tolerating	O
shifts	O
in	O
line	O
number	O
.	O
</s>
<s>
The	O
Git	O
source	B-Device
code	I-Device
control	I-Device
system	I-Device
employs	O
delta	B-Algorithm
compression	I-Algorithm
in	O
an	O
auxiliary	O
""	O
operation	O
.	O
</s>
<s>
Objects	O
in	O
the	O
repository	O
that	O
have	O
not	O
yet	O
been	O
delta-compressed	O
(	O
"	O
loose	O
objects	O
"	O
)	O
are	O
compared	O
against	O
a	O
heuristically	O
chosen	O
subset	O
of	O
all	O
other	O
objects	O
,	O
and	O
the	O
common	O
data	O
and	O
differences	B-Application
are	O
concatenated	O
into	O
a	O
"	O
pack	O
file	O
"	O
which	O
is	O
then	O
compressed	O
using	O
conventional	O
methods	O
.	O
</s>
<s>
One	O
general	O
format	O
for	O
directed	O
delta	B-Algorithm
encoding	I-Algorithm
is	O
VCDIFF	O
,	O
described	O
in	O
.	O
</s>
<s>
Free	B-Application
software	I-Application
implementations	O
include	O
Xdelta	B-Application
and	O
open-vcdiff	O
.	O
</s>
<s>
Generic	O
Diff	O
Format	O
(	O
GDIFF	O
)	O
is	O
another	O
directed	O
delta	B-Algorithm
encoding	I-Algorithm
format	O
.	O
</s>
<s>
Bsdiff	O
is	O
a	O
binary	O
diff	O
program	O
using	O
suffix	B-Algorithm
sorting	I-Algorithm
.	O
</s>
<s>
Bsdiff	O
achieves	O
this	O
by	O
allowing	O
"	O
copy	O
"	O
matches	O
with	O
errors	O
,	O
which	O
are	O
then	O
corrected	O
using	O
an	O
extra	O
"	O
add	O
"	O
array	O
of	O
bytewise	O
differences	B-Application
.	O
</s>
<s>
The	O
deltarpm	B-Application
feature	O
of	O
the	O
RPM	B-Application
Package	I-Application
Manager	I-Application
is	O
based	O
on	O
a	O
heavily-modified	O
bsdiff	O
that	O
can	O
use	O
a	O
hash	O
table	O
for	O
matching	O
.	O
</s>
<s>
FreeBSD	B-Operating_System
also	O
uses	O
bsdiff	O
for	O
updates	O
.	O
</s>
<s>
FreeBSD	B-Operating_System
takes	O
many	O
of	O
Google	O
's	O
compatible	O
changes	O
,	O
mainly	O
a	O
vulnerability	O
fix	O
and	O
a	O
switch	O
to	O
the	O
faster	O
suffix-sorting	O
routine	O
.	O
</s>
