From: Ricardo Markiewicz Date: Tue, 22 Jun 2004 19:37:30 +0000 (+0000) Subject: BUGFIX : se estaba guardando mal el pagesize X-Git-Tag: svn_import~85 X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/commitdiff_plain/0768f357f8e01a0baedfbb0ae1adf0e6fd4d4261?ds=inline BUGFIX : se estaba guardando mal el pagesize --- 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);