From: Ricardo Markiewicz Date: Wed, 23 Jun 2004 03:45:04 +0000 (+0000) Subject: DESCOMPRIME !!!!!!!!!!!!!!!!!! X-Git-Tag: svn_import~79 X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/commitdiff_plain/551c1b8346a4c4a5128a7cfe4d4804bf40b4a0d2 DESCOMPRIME !!!!!!!!!!!!!!!!!! --- diff --git a/src/blocksorting/bs.c b/src/blocksorting/bs.c index b95b74b..0aff024 100644 --- a/src/blocksorting/bs.c +++ b/src/blocksorting/bs.c @@ -124,8 +124,11 @@ void bs_restore(char *dst, char *c, Uint32 k, Uint32 len) i=0; do { dst[i++] = in[current].c; + printf("(%c)", dst[i-1]); current = in[current].pos; + printf("[%d]", current); } while (current != k); + printf("\n"); free(in); } diff --git a/src/jacu.c b/src/jacu.c index dd18485..f08e731 100644 --- a/src/jacu.c +++ b/src/jacu.c @@ -201,19 +201,20 @@ int main(int argc, char* argv[]) PERR("Leo bloque"); fread(&block_size, sizeof(Uint32), 1, fp_in); 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 0) { + 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