From 87673889dd7bc0a18e9cefd5cae898ef0e864ba8 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 21 Jun 2004 21:33:04 +0000 Subject: [PATCH 1/1] =?utf8?q?Agrego=20opci=C3=B3n=20para=20incluir=20ZG?= =?utf8?q?=20en=20jacu=20(s=C3=B3lo=20en=20la=20compresi=C3=B3n,=20por=20a?= =?utf8?q?hora).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/Makefile | 3 ++- src/jacu.c | 27 +++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index a046cde..87d5c66 100644 --- a/src/Makefile +++ b/src/Makefile @@ -25,7 +25,8 @@ # TARGETS=jacu -COMMON=mtf/mtf.o blocksorting/bs.o statichuff/statichuff.o vfile/vfile.o vfile/common.o +COMMON=zerogrouping/zerogrouping.o mtf/mtf.o blocksorting/bs.o \ + statichuff/statichuff.o vfile/vfile.o vfile/common.o SRCS=jacu.c #CFLAGS=-O3 -Wall -DNDEBUG diff --git a/src/jacu.c b/src/jacu.c index 3d18ed3..fc4188f 100644 --- a/src/jacu.c +++ b/src/jacu.c @@ -1,7 +1,8 @@ -#include "statichuff/statichuff.h" #include "blocksorting/bs.h" #include "mtf/mtf.h" +#include "zerogrouping/zerogrouping.h" +#include "statichuff/statichuff.h" #include "vfile/vfile.h" #include #include @@ -11,6 +12,7 @@ int main(int argc, char* argv[]) { int cflag = 0; int dflag = 0; + int zflag = 0; int tflag = 0; int pflag = 0; long int volumesize = 0; @@ -18,7 +20,7 @@ int main(int argc, char* argv[]) int ch; t_BlockSort *bs; - while ((ch = getopt(argc, argv, "cdt:p:")) != -1) { + while ((ch = getopt(argc, argv, "cdzt:p:")) != -1) { switch (ch) { case 'c': cflag = 1; @@ -27,6 +29,9 @@ int main(int argc, char* argv[]) case 'd': dflag = 1; break; + case 'z': zflag = 1; + break; + case 't': tflag = 1; volumesize = atol(optarg); break; @@ -83,8 +88,22 @@ int main(int argc, char* argv[]) /* Le aplico el MTF, salteo el tamaƱo del bloque para que no se pierda. */ mtf = jacu_mtf(salida+sizeof(unsigned long int), i+sizeof(unsigned long int)); - for(j=0; j