bzip2 Compressed
ไฟล์ BZ2 บีบอัดด้วย bzip2 ซึ่งให้อัตราส่วนการบีบอัดที่ดีกว่า gzip แลกกับความเร็วที่ช้าลง ใช้อัลกอริทึม Burrows-Wheeler Transform สำหรับการบีบอัดแบบบล็อก
ประเภท MIME
application/x-bzip2
ประเภท
ไบนารี
การบีบอัด
ไม่สูญเสียคุณภาพ
ข้อดี
- + Better compression ratio than gzip (typically 10-20% smaller)
- + Built-in data integrity checking per block
- + Widely available on Unix/Linux systems
ข้อเสีย
- − Significantly slower than gzip for both compression and decompression
- − Higher memory usage than gzip
- − Largely superseded by xz and Zstandard for new projects
เมื่อใดควรใช้ .BZ2
ใช้ bzip2 เมื่อต้องการการบีบอัดที่ดีกว่า gzip และความเร็วไม่ใช่สิ่งสำคัญ — tarball ซอร์สโค้ดและการจัดเก็บถาวร
รายละเอียดทางเทคนิค
Bzip2 ใช้ Burrows-Wheeler Transform (BWT) ตามด้วย Move-to-Front encoding และ Huffman coding ประมวลผลข้อมูลในบล็อก (100K-900K) ทำให้สามารถบีบอัดแบบขนานได้
ประวัติ
Julian Seward สร้าง bzip2 ในปี 1996 โดยใช้การบีบอัดแบบ Burrows-Wheeler block sorting ได้รับความนิยมในชุมชน Linux เป็นทางเลือกแทน gzip ที่ให้การบีบอัดที่ดีกว่า