int main(int argc, char *argv[] )
{
- int buff[BUFFER_SIZE];
+ char buff[BUFFER_SIZE];
+ char *z, *dato;
int *pos;
int len;
- int i;
+ int i, size;
+
len = fread(buff, 1, BUFFER_SIZE, stdin);
buff[len] = '\0';
-
pos = jacu_mtf(buff, len);
+ for(i=0; i<len; i++)
+ printf("%d ",pos[i]);/*putchar(pos[i]);*/
+ printf("\n-----Inversa del MTF-----\n");
+ z = jacu_buscar_z(buff, len, &size);
+ dato = jacu_mtf_inv(z, pos, len);
for(i=0; i<len; i++)
- putchar(pos[i]);
+ putchar(dato[i]);
+ free(dato);
+ free(z);
free(pos);
return 0;
}
-