Switching tarballs to xz

26 views
Skip to first unread message

Theppitak Karoonboonyanan

unread,
Jan 21, 2013, 10:07:49 PM1/21/13
to thai-linux...@googlegroups.com
สวัสดีครับ,

เนื่องจากการบีบอัดแบบ xz เริ่มได้รับความนิยมมากขึ้น
จากอัตราการบีบอัดที่สูงกว่า gzip โดยไม่กิน CPU มากขึ้นขณะคลาย
(กลายเป็นข้อได้เปรียบเหนือ bzip2 ด้วย)

ตัวอย่าง: ทดลองบีบอัด libdatrie-0.2.5.tar.gz ใหม่ด้วย xz:

$ zcat libdatrie-0.2.5.tar.gz | xz - > libdatrie-0.2.5.tar.xz
$ ls -l libdatrie-0.2.5.tar.*
-rw-r--r-- 1 thep thep 381307 พ.ย. 4 2011 libdatrie-0.2.5.tar.gz
-rw-r--r-- 1 thep thep 261680 ม.ค. 22 10:03 libdatrie-0.2.5.tar.xz

โครงการหลายโครงการ เช่น GNOME และ Debian ก็เริ่มใช้ xz แทน gz กันแล้ว
(ทาง KDE ผมไม่ได้ตาม)

จึงขอเสนอว่า การออกรุ่นของซอฟต์แวร์ที่ LTN นับจากนี้ไป
น่าจะเปลี่ยนมาออก tarball ในรูป *.tar.xz แทน *.tar.gz นะครับ
คิดว่าจะมีปัญหาอะไรไหมครับ?

เทพ.
--
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/

Sira Nokyoongtong

unread,
Jan 21, 2013, 10:26:24 PM1/21/13
to thai-linux...@googlegroups.com
ไม่น่ามีปัญหานะครับ ผู้ใช้น่าจะรู้ได้เอง

2013/1/22 Theppitak Karoonboonyanan <th...@linux.thai.net>:

> --
> คุณได้รับข้อความนี้เนื่องจากคุณสมัครรับข้อมูลจากกลุ่ม "Thai Linux/FOSS developers" ของ Google Groups
> หากต้องการโพสต์ถึงกลุ่มนี้ ให้ส่งอีเมลไปที่ thai-linux...@googlegroups.com
> หากต้องการยกเลิกการสมัครสำหรับกลุ่มนี้ โปรดส่งอีเมลไปที่ thai-linux-foss-...@googlegroups.com
> สำหรับตัวเลือกเพิ่มเติม โปรดเข้าสู่กลุ่มนี้ที่ http://groups.google.com/group/thai-linux-foss-devel?hl=th
>

Theppitak Karoonboonyanan

unread,
Jan 21, 2013, 10:47:39 PM1/21/13
to thai-linux...@googlegroups.com
2013/1/22 Sira Nokyoongtong <gum...@gmail.com>:

> ไม่น่ามีปัญหานะครับ ผู้ใช้น่าจะรู้ได้เอง

คำถามหนึ่งที่ถามตัวเองคือ มีตัว decompress บนวินโดวส์ไหม?
(เผื่อผู้ใช้วินโดวส์เอาฟอนต์ไปใช้ เป็นต้น)

พบว่า 7-Zip สามารถแตก xz ได้ตั้งแต่รุ่น 9.20 เป็นต้นไป
http://en.wikipedia.org/wiki/7-Zip#Other_supported_formats

ส่วน WinZip ข้อมูลไม่เคลียร์
http://en.wikipedia.org/wiki/WinZip#Features
http://www.winzip.com/win/en/wzfeatures-zip.htm#sub-nav

"...including Zip, Zipx, RAR, 7Zip, BZ2, LHA/LZH and many more."

ไม่รู้ว่า xz รวมอยู่ใน "and many more" หรือเปล่า

แต่มี 7-Zip ก็น่าจะใช้ได้แล้วมั้ง?

Theppitak Karoonboonyanan

unread,
Jan 21, 2013, 11:03:11 PM1/21/13
to thai-linux...@googlegroups.com
2013/1/22 Theppitak Karoonboonyanan <th...@linux.thai.net>:

> ตัวอย่าง: ทดลองบีบอัด libdatrie-0.2.5.tar.gz ใหม่ด้วย xz:
>
> $ zcat libdatrie-0.2.5.tar.gz | xz - > libdatrie-0.2.5.tar.xz
> $ ls -l libdatrie-0.2.5.tar.*
> -rw-r--r-- 1 thep thep 381307 พ.ย. 4 2011 libdatrie-0.2.5.tar.gz
> -rw-r--r-- 1 thep thep 261680 ม.ค. 22 10:03 libdatrie-0.2.5.tar.xz

ทดลองเพิ่มเติมกับ bzip2:

$ zcat libdatrie-0.2.5.tar.gz | bzip2 - > libdatrie-0.2.5.tar.bz2
$ ls -l libdatrie-0.2.5.tar.*
-rw-r--r-- 1 thep thep 301096 ม.ค. 22 10:56 libdatrie-0.2.5.tar.bz2
-rw-r--r-- 1 thep thep 381307 พ.ย. 4 2011 libdatrie-0.2.5.tar.gz
-rw-r--r-- 1 thep thep 261680 ม.ค. 22 10:03 libdatrie-0.2.5.tar.xz

เรื่องขนาด xz กินขาด

ลองจับเวลาการ decompress:

$ time zcat libdatrie-0.2.5.tar.gz > /dev/null

real 0m0.029s
user 0m0.024s
sys 0m0.004s
$ time xzcat libdatrie-0.2.5.tar.xz > /dev/null

real 0m0.039s
user 0m0.032s
sys 0m0.004s
$ time bzcat libdatrie-0.2.5.tar.bz2 > /dev/null

real 0m0.084s
user 0m0.080s
sys 0m0.004s

xz กินเวลามากกว่า gzip นิดหน่อยเท่านั้น แต่ bzip2 นี่ห่างเลย

Vee Satayamas

unread,
Jan 22, 2013, 12:00:21 AM1/22/13
to thai-linux...@googlegroups.com

ไม่มีปัญหาครับ

วีร์

เมื่อ 22 ม.ค. 2013 10:07, "Theppitak Karoonboonyanan" <th...@linux.thai.net> เขียนว่า:

Theppitak Karoonboonyanan

unread,
Jan 22, 2013, 7:48:15 AM1/22/13
to thai-linux...@googlegroups.com
2013/1/22 Vee Satayamas <vsata...@gmail.com>:

> ไม่มีปัญหาครับ

สรุปจากความเห็นที่ผ่านมา ตกลงว่าเริ่มใช้ xz tarball กันเลยนะครับ

Theppitak Karoonboonyanan

unread,
Jan 23, 2013, 12:20:46 AM1/23/13
to thai-linux...@googlegroups.com
2013/1/22 Theppitak Karoonboonyanan <th...@linux.thai.net>:

> สรุปจากความเห็นที่ผ่านมา ตกลงว่าเริ่มใช้ xz tarball กันเลยนะครับ

ประกาศแล้วนะครับ:

http://linux.thai.net/node/260

Reply all
Reply to author
Forward
0 new messages