The original tar call bzip2 is compressed with the highest compression ratio

Source: Internet
Author: User
The original tar call bzip2 was compressed with the highest compression ratio-general Linux technology-Linux technology and application information. The following is a detailed description. [I = s] This post was last edited by weixq316

For a long time, I always use tar to compress objects, and then call bzip2-9 to compress objects. Because I always think that tar calls bzip2 to compress objects with default parameters, today, we want to compress some small things and try to compress them. We will not waste much time doing an experiment. We will do the following experiment:
First time: Pack with tar and Compress With bzip2-9 to get test.tar.bz2 792 K at the end.
Second: use tar cjf to get a compressed package test1.tar.bz2.
Du-h test * compare the size, hey! Consistent size !, Today, I only know that bzip2 is called by tar, and bzip2-9 gets the highest compression ratio! Now, we will not do it in two steps in the future, and the same will happen directly.

[Fedoraman @ billyway ext4] $ tar cf test.tar winXPDLL
[Fedoraman @ billyway ext4] $ du-h test.tar
1.8 M test.tar
[Fedoraman @ billyway ext4] $ bzip2-9 test.tar
[Fedoraman @ billyway ext4] $ du-h test.tar.bz2
792 K test.tar.bz2

[Fedoraman @ billyway ext4] $ tar cjf test1.tar.bz2 winXPDLL


[Fedoraman @ billyway ext4] $ du-h test *
792 K test1.tar.bz2
792 K test.tar.bz2


Http://user.qzone.qq.com/88602273
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.