char *salida, *data, c;
data = malloc(sizeof(char)*pagesize);
/* Reservo lugar tambien para guardar el k */
- salida = malloc(sizeof(char)*(pagesize)+sizeof(unsigned long int));
+ salida = malloc(sizeof(char)*(pagesize)+sizeof(unsigned long int)*2);
bs = bs_create(pagesize);
fp = fopen(argv[optind], "rb");
fp_out = fopen("tmp.comp", "wb");
/* Hago el BS */
bs_solve(data, salida, bs, &k, i);
/* Le aplico el MTF */
- mtf = jacu_mtf(salida, i+sizeof(unsigned long int));
+ mtf = jacu_mtf(salida, i+sizeof(unsigned long int)*2);
for(j=0; j<i; j++)
fputc(mtf[j], fp_out);
}