Format Comparison

Purpose

This guide compares the archive formats supported by Excavate to help you choose the right format for your needs.

Format Overview

Format Extension Compression Platform Recursive

CAB

.cab

LZSS, MSZIP, LZX, Quantum

Windows

Yes

CPIO

.cpio

None

Unix

Yes

GZIP

.gz, .tar.gz

Deflate

Cross-platform

Yes

MSI

.msi

Embedded CAB

Windows

Yes (nested)

RPM

.rpm

GZIP, XZ, BZIP2

Linux

Yes (nested)

7-Zip

.7z

LZMA, LZMA2

Cross-platform

Yes

TAR

.tar

None

Unix

Yes

XAR/PKG

.xar, .pkg

GZIP, BZIP2

macOS

Yes (nested)

XZ

.xz, .tar.xz

LZMA, LZMA2

Cross-platform

Yes

ZIP

.zip

Deflate, Deflate64

Cross-platform

Yes

Format Selection Guide

By Platform

By Use Case

Compression Comparison

Table 1. Legacy Windows:: CAB
Format Speed Ratio Compatibility

ZIP

Fast

Good

Excellent

TAR.GZ

Fast

Good

Excellent

TAR.XZ

Slow

Excellent

Good

7-Zip

Moderate

Excellent

Good

CAB

Fast

Good

Windows

Recursive Extraction Support

All formats support recursive extraction for nested archives:

# All formats support recursive_packages
Excavate::Archive.new('any.format').extract(recursive_packages: true)

Formats commonly containing nested archives:

  • MSI → CAB

  • PKG → CPIO.GZ

  • RPM → CPIO.GZ

  • TAR.GZ → any nested archive

Feature Matrix

Feature ZIP TAR.GZ 7-Zip MSI PKG

Pure Ruby

✓

✓

✓

✓

✓

Auto-detection

✓

✓

✓

✓

✓

Selective extraction

✓

✓

✓

✓

✓

Filter patterns

✓

✓

✓

✓

✓

Recursive extraction

✓

✓

✓

✓

✓

CLI support

✓

✓

✓

✓

✓