len = fread(buff, 1, BUFFER_SIZE, stdin);
buff[len] = '\0';
pos = jacu_mtf(buff, len, &z, &z_len);
+
+ printf("Z len = %d\n",z_len);
+ print_z(z, z_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);
+ print_z(z, size);
+ printf("Z_INV len = %d\n",size);
dato = jacu_mtf_inv(z, pos, len);
for(i=0; i<len; i++)
putchar(dato[i]);
pos = (unsigned char *)malloc(len*sizeof(unsigned char));
z = jacu_buscar_z(datos, len, &size);
- *_z = (unsigned char*)malloc(len*sizeof(unsigned char));
+ *_z = (unsigned char*)malloc(size*sizeof(unsigned char));
memcpy(*_z, z, size*sizeof(unsigned char));
for(i=0; i<len; i++){
pos[i] = get_pos(z, size, datos[i]);
unsigned char *jacu_buscar_z(unsigned char* datos, int len, int *size);
+void print_z(char *z, int len);
#endif