3 Comments

  1. Why not just use -z for gzip or -j for bzip2 to do it inline instead of piping it to gzip?

    gzip version:
    tar -czvf somedir.tar.gz somedir/

    bzip2 version (better compression):
    tar -cjvf somedir.tar.bz2 somedir/

  2. Thanks for the tip =). I think I am so use to this format because I work with lzop a lot and tar does not support lzop natively.

  3. Yep, that makes sense.

    LZO has faster throughput than gzip too but I still prefer gzip for shallow compression needs and bzip2 for when I really need to mash a square peg in a round hole. 🙂

    Here’s an interesting benchmark comparison that someone did:
    http://forums.admon.org/linux-software/50-performance-compare-among-three-tools-gzip-lzo-bzip2.html

    bzip2 has always been slower than gzip IMHO but the compression ratio is far superior and since both gzip and bzip2 can be done inline with tar, I’ve rarely found a performance need to move into the newer compression project LZO. That said though, you’d think being around since 1996 would warrant a tar flag for LZO… still don’t know why it hasn’t been added. Oh well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.