int main(int argc, char *argv[] )
{
- int buff[BUFFER_SIZE];
- int *pos;
+ char buff[BUFFER_SIZE];
+ char *z, *dato;
+ char *pos;
int len;
- int i;
+ int i, size, z_len;
+
len = fread(buff, 1, BUFFER_SIZE, stdin);
buff[len] = '\0';
+ pos = jacu_mtf(buff, len, &z, &z_len);
+ for(i=0; i<len; i++)
+ printf("%d ",pos[i]);/*putchar(pos[i]);*/
- pos = jacu_mtf(buff, len);
-
+ 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;
}
-