On 2/10/2010 8:16 AM, Petar Bogdanovic wrote: >> I want use bzip2 to compress my file, because I thing bzip2 is more >> efficient... >> > Really? > > $ du -m /tmp/foo.iso > 625 /tmp/foo.iso > $ gzip -c</tmp/foo.iso | dd bs=64K>/dev/null > 0+34388 records in > 0+34388 records out > 563405802 bytes (563 MB) copied, 64.9428 s, 8.7 MB/s > $ bzip2 -c</tmp/foo.iso | dd bs=64K>/dev/null > 0+137488 records in > 0+137488 records out > 563150276 bytes (563 MB) copied, 445.201 s, 1.3 MB/s > > 255526 bytes less while six times slower.. > > Petar Bogdanovic > > This is extremely dependent on the contents of foo.iso. I don't think its a good test because you are only seeing 10% compression either way. There is a good chance that much of the data within your ISO is already compressed. When using data which is typically more compressible (text and other data that is not already compressed), the resulting size of something compressed with bzip2 can be much smaller than when compressed using gzip. It's true that it is much slower, but if he's talking about it being more efficient in terms of disk space used, then he is correct.
------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users