/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2003-2011 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 <vclib.h>
/* Burrows-Wheeler transform.
**
** Written by Kiem-Phong Vo (kpv@research.att.com)
*/
#if __STD_C
#else
#endif
{
if(size == 0)
return 0;
/* compute suffix array */
RETURN(-1);
/* compute the location of the sentinel */
if(*idx == 0)
break;
goto done;
/* compute the transform */
{ if(*idx == 0) /* special coding of the 0th position */
}
/* filter data thru the continuation coder */
goto done;
/* write out the sorted location of position-0 in data */
/* truncate buffer to size */
RETURN(-1);
if(out)
return rv;
}
#if __STD_C
#else
#endif
{
if(size == 0)
return 0;
RETURN(-1);
/* retrieve transformed data */
/* invert continuation coder if there was one */
RETURN(-1);
RETURN(-1);
/* get space to decode */
RETURN(-1);
RETURN(-1);
/* base and offset vector for bytes */
for(n = 0; n < 256; ++n)
base[n] = 0;
for(n = 0; n <= sz; ++n)
{ if(n == sp)
offset[n] = 0;
else
}
}
for(sp = 0, n = 0; n < 256; ++n)
sp += c;
}
/* now invert the transform */
{ *o = dt[n];
}
if(out)
return sz;
}
{ vcbwt,
0,
"bwt", "Burrows-Wheeler transform.",
"[-version?bwt (AT&T Research) 2003-01-01]" USAGE_LICENSE,
4*1024*1024,
0
};