X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/1e857d6dff5bd9eadd7b59a2deb323eb5d644ccf..0768f357f8e01a0baedfbb0ae1adf0e6fd4d4261:/src/jacu.c diff --git a/src/jacu.c b/src/jacu.c index ba8daf1..d31c648 100644 --- a/src/jacu.c +++ b/src/jacu.c @@ -115,9 +115,20 @@ int main(int argc, char* argv[]) /* Hago el BS */ bs_solve(data, salida, bs, &k, i); + printf("BS k=%ld\n", k); + printf("PageSize = %ld\n", i); + /* Le aplico el MTF, salteo el tamaƱo del bloque para que no se pierda. */ mtf = jacu_mtf(salida+sizeof(Uint32), i+sizeof(Uint32), &z, &z_len); + printf("MTF Z (len=%d) = [", z_len); + { + int ii; + for(ii=0; ii 0) { block = malloc(block_size*sizeof(char)+sizeof(Uint32)); orig = malloc(block_size*sizeof(char)); @@ -193,6 +213,7 @@ int main(int argc, char* argv[]) /* Luego de hacer el MTF inverso ya puedo recuperar el k */ memcpy(&k, block, sizeof(Uint32)); + printf("Restored : k=%ld\n", k); bs_restore(orig, block+sizeof(Uint32), k, block_size); fwrite(orig, block_size, sizeof(char), fp_out);