/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2003-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#include "vcdhdr.h"
/* Delta compression based on the Vcdiff data format.
**
** Written by Kiem-Phong Vo (kpv@research.att.com)
*/
{ 0 , "String matching via hashing.", 0 }
};
#if __STD_C
#else
#endif
{
int cd;
}
#if __STD_C
#else
#endif
{
}
#if __STD_C
#else
#endif
{
int cd;
}
#if __STD_C
#else
#endif
{
int cd;
else /* saved ADD */
else
}
}
}
return oz;
}
#if __STD_C
#else
#endif
{
int cd;
return -1;
}
}
return oz;
}
#if __STD_C
#else
int type; /* type of instruction */
ssize_t n; /* number of fragments */
#endif
{
#if 0
{ Vcmatch_t* m;
}
if(m->mpos >= 0 || n > 1)
{ if(m->mpos < 0)
m += 1;
}
}
#endif
return -1;
len += l;
here += l;
}
continue;
return -1;
len += l;
here += l;
}
else
return -1;
len += l;
here += l;
}
}
return len;
}
#if __STD_C
#else
#endif
{
if(ntar == 0)
return 0;
/* obtain output buffer */
return -1;
/* initialize address caches and saved COPY instruction */
vcdputcopy(vcd, 0, 0, 0);
ctrl = 0;
{ d = n; rd = p;
ctrl |= VCD_DATACOMPRESS;
}
{ i = n; ri = p;
ctrl |= VCD_INSTCOMPRESS;
}
{ a = n; ra = p;
ctrl |= VCD_ADDRCOMPRESS;
}
}
/* output data */
return -1;
if(del)
return n;
}
#if __STD_C
#else
#endif
{
Vcchar_t *t, *s;
int ctrl;
/* read size of data buffers */
/* make sure we have enough data for decoding */
RETURN(-1);
/* data, instructions and COPY addresses */
/* recompute the data, instruction and address streams if encoded */
{ if(ctrl&VCD_DATACOMPRESS)
RETURN(-1);
}
if(ctrl&VCD_INSTCOMPRESS)
RETURN(-1);
}
if(ctrl&VCD_ADDRCOMPRESS)
RETURN(-1);
}
}
vcdkaclear(ka);
/* buffer to reconstruct data */
RETURN(-1);
/* get the pair of instructions */
RETURN(-1);
for(i = 0; i < 2; ++i)
continue;
RETURN(-1);
}
RETURN(-1);
*t++ = (Vcchar_t)d;
}
RETURN(-1);
if(d < nsrc)
RETURN(-1);
s = src+d;
}
else
RETURN(-1);
s = tar+d;
}
*t++ = *s++;
}
RETURN(-1);
t += sz;
}
RETURN(-1);
*t++ = (Vcchar_t)d;
}
else RETURN(-1);
}
}
return -1;
if(out)
return ntar;
}
#if __STD_C
#else
int type;
#endif
{
_vcdtblinit(); /* initialize default code tables */
if(type == VC_OPENING)
return -1;
if(arg)
return -1;
}
return 0;
}
else if(type == VC_CLOSING)
}
return 0;
}
else return 0;
}
{ vcddiff,
"delta", "(Delta) Compression using the Vcdiff format.",
"[-version?delta (AT&T Research) 2003-01-01]" USAGE_LICENSE,
1024*1024,
};