Date: Tue, 09 Aug 2011 22:06:07 -0500 From: Stephen Montgomery-Smith <stephen@missouri.edu> To: "ctm-users@freebsd.org" <ctm-users@freebsd.org> Subject: Use of xz instead of gzip Message-ID: <4E41F59F.9020201@missouri.edu>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------090306070104000700080905 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit It seems that xz has much better compression than gzip. How do people feel about moving CTM to use xz instead of gzip? This will give about a 40% reduction in the size of the CTM files. In particular, if I start putting SVN on CTM, this will save about 3G. It requires two things: First, the attached patch needs to be applied to /usr/src. (Any committers willing to commit it? It needs to MFC'ed rather quickly if I start using xz.) Secondly, if your version of FreeBSD is old (like 7.x or older) you need to install the archivers/xz port. If you don't, when you attempt to apply ctm to a "xz" compressed file, it replies with a rather helpful message "xz not found." Stephen --------------090306070104000700080905 Content-Type: text/plain; name="ddd" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ddd" diff -ur ~/FreeBSD-8/src/usr.sbin/ctm/ctm/ctm.c usr.sbin/ctm/ctm/ctm.c --- /home/stephen/FreeBSD-8/src/usr.sbin/ctm/ctm/ctm.c 2011-08-09 16:38:22.000000000 -0500 +++ usr.sbin/ctm/ctm/ctm.c 2011-08-09 21:11:31.000000000 -0500 @@ -211,6 +211,12 @@ strcat(p,filename); f = popen(p,"r"); if(!f) { warn("%s", p); return Exit_Garbage; } + } else if(p && !strcmp(p,".xz")) { + 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"); --------------090306070104000700080905--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E41F59F.9020201>