- while (!feof(fp_in)) {
- block_size = 0;
- fread(&block_size, sizeof(Uint32), 1, fp_in);
- if (block_size > 0) {
- printf("PageSize = %ld\n", block_size);
- fread(&z_len, sizeof(int), 1, fp_in);
- z = malloc(sizeof(char)*z_len);
- fread(z, z_len, sizeof(char), fp_in);
-
- /*printf("MTF Z (len=%d) = [", z_len);
- {
- int ii;
- for(ii=0; ii<z_len; ii++)
- printf("(%c)", z[ii]);
- printf("]\n");
-
- }*/
-
- block = malloc(block_size*sizeof(char)+sizeof(Uint32));
- orig = malloc(block_size*sizeof(char));
- fread(block, block_size+sizeof(Uint32), sizeof(char), fp_in);
+ /* Descomprimo byte que indica si se usa ZG */
+ if (!(moredata = shuff_decode_chunk(shuff, &use_zg, 1, &decoded))) return 1;