diff -u ctm.1.orig ctm.1 --- ctm.1.orig 2011-08-10 17:04:53.000000000 -0500 +++ ctm.1 2011-08-10 17:06:01.000000000 -0500 @@ -52,8 +52,11 @@ You can pass a CTM delta on stdin, or you can give the filename as an argument. If you do the latter, you make life a lot -easier for your self, since the program can accept gzip'ed files and +easier for your self, since the program can accept gzip'ed, +bzip2'ed, or xz'ed files and since it will not have to make a temporary copy of your file. +(If you pass it an xz'ed file, and xz is not part of your base system, +you will have to install xz from the ports.) You can specify multiple deltas at one time, they will be processed one at a time. diff -u ctm.c.orig ctm.c --- ctm.c.orig 2011-08-10 17:15:30.000000000 -0500 +++ ctm.c 2011-08-10 17:19:23.000000000 -0500 @@ -211,6 +211,22 @@ strcat(p,filename); f = popen(p,"r"); if(!f) { warn("%s", p); return Exit_Garbage; } + } else if(p && !strcmp(p,".bz2")) { + p = alloca(20 + strlen(filename)); + strcpy(p,"bzcat < "); + strcat(p,filename); + f = popen(p,"r"); + if(!f) { warn("%s", p); return Exit_Garbage; } + } else if(p && !strcmp(p,".xz")) { + if (system("which -s xz") != 0) { + fprintf(stderr, "xz is not installed. You can install it from ports.\n"); + return Exit_Garbage; + } + p = alloca(20 + strlen(filename)); + strcpy(p,"xz -dc < "); + strcat(p,filename); + f = popen(p,"r"); + if(!f) { warn("%s", p); return Exit_Garbage; } } else { p = 0; f = fopen(filename,"r");