bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] RE: PATCH: Lzo compression support


From: devzero
Subject: [Bug-tar] RE: PATCH: Lzo compression support
Date: Sat, 21 Apr 2007 12:41:48 +0200

hi !

is it planned to add this lzo patch to tar ?

if not, you maintainers should really consider doing so - lzo compression is 
just great and lzop is quite portable, maybe even like gzip and bzip2

here are some "real world" benchmarks for comparison:


time tar cqf|czf|cjf  test.dat.lzo|.gz|.bz2 test.dat

lzo:      real    0m27.507s   user    0m5.824s    sys     0m4.170s
gzip:    real    0m47.059s   user    0m30.969s  sys     0m3.524s
bzip:    real    4m36.405s   user    4m6.958s    sys     0m2.913s

filesizes:

test.dat              500M 
test.dat.tar.lzo     93M 
test.dat.tar.gz      62M 
test.dat.tar.bz2    51M 

as you can see, lzo compresses much faster and much, much more cpu friendly, 
unfortunately giving worse compression - but - reducing 500M down to 93M is  
still "good enough".

regards
roland 

(sysadmin, using lzop for years and thinking that it`s time for having lzo 
support in tar ;)



[Bug-tar] PATCH: Lzo compression support

Kevin Day
Tue, 27 Mar 2007 04:48:27 -0800

I found LZO to be as useful and open-source friendly as gzip and bzip2.
For those wondering: http://www.lzop.org/ and
http://www.oberhumer.com/opensource/lzo/

Here is the patch (tested and working) to make this a possible addition to tar
To my surprise, there were still letters available, i picked 'q'.

--- tar-1.16.1/src/buffer.c.orig        2006-12-30 10:40:59.000000000 -0600
+++ tar-1.16.1/src/buffer.c     2006-12-30 11:54:33.000000000 -0600
@@ -196,7 +196,8 @@
  ct_none,
  ct_compress,
  ct_gzip,
-  ct_bzip2
+  ct_bzip2,
+  ct_lzop
};

struct zip_magic
@@ -213,6 +214,7 @@
  { ct_compress, 2, "\037\235", "compress", "-Z" },
  { ct_gzip,     2, "\037\213", "gzip", "-z"  },
  { ct_bzip2,    3, "BZh",      "bzip2", "-j" },
+  { ct_lzop,     4, "\211LZO",  "lzop", "-q" },
};

#define NMAGIC (sizeof(magic)/sizeof(magic[0]))
--- tar-1.16.1/src/tar.c.orig   2006-12-30 10:41:04.000000000 -0600
+++ tar-1.16.1/src/tar.c        2006-12-30 12:06:10.000000000 -0600
@@ -572,6 +572,8 @@
   N_("create archive with volume name TEXT; at list/extract time,
use TEXT as a globbing pattern for volume name"), GRID+8 },
  {"bzip2", 'j', 0, 0,
   N_("filter the archive through bzip2"), GRID+8 },
+  {"lzop", 'q', 0, 0,
+   N_("filter the archive through lzop"), GRID+8 },
  {"gzip", 'z', 0, 0,
   N_("filter the archive through gzip"), GRID+8 },
  {"gunzip", 0, 0, OPTION_ALIAS, NULL, GRID+8 },
@@ -1340,6 +1342,10 @@
      absolute_names_option = true;
      break;

+    case 'q':
+      set_use_compress_program_option ("lzop");
+      break;
+
    case 'r':
      set_subcommand_option (APPEND_SUBCOMMAND);
      break;

--
Kevin Day
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192





reply via email to

[Prev in Thread] Current Thread [Next in Thread]