From 0768f357f8e01a0baedfbb0ae1adf0e6fd4d4261 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Tue, 22 Jun 2004 19:37:30 +0000 Subject: [PATCH] BUGFIX : se estaba guardando mal el pagesize --- src/jacu.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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); -- 2.43.0