Migration Purpose Guide for migrating from other archive tools to Excavate.
From Rubyzip Rubyzip
require 'zip'
Zip :: File . open ( 'archive.zip' ) do | zip_file |
zip_file . each do | entry |
entry . extract ( entry . name )
end
end Excavate
require 'excavate'
Excavate :: Archive . new ( 'archive.zip' ). extract Rubyzip
Zip :: File . open ( 'archive.zip' ) do | zip_file |
entry = zip_file . find_entry ( 'config.json' )
entry & . extract ( 'config.json' )
end Excavate
Excavate :: Archive . new ( 'archive.zip' ). extract ( files: [ 'config.json' ]) From ruby-archive ruby-archive
Archive . read . open ( 'archive.zip' ) do | archive |
archive . each do | entry |
# Manual extraction
end
end Excavate
Excavate :: Archive . new ( 'archive.zip' ). extract Using unzip unzip (shell)
unzip archive.zip -d output/ Excavate
Excavate :: Archive . new ( 'archive.zip' ). extract ( 'output' ) Using tar tar (shell)
tar -xzf archive.tar.gz -C output/ Excavate
Excavate :: Archive . new ( 'archive.tar.gz' ). extract ( 'output' ) Using 7z 7z (shell)
7z x archive.7z -ooutput / Excavate
Excavate :: Archive . new ( 'archive.7z' ). extract ( 'output' ) Advantages of Excavate Unified Interface # Same code works for all formats
Excavate :: Archive . new ( 'file.zip' ). extract
Excavate :: Archive . new ( 'file.tar.gz' ). extract
Excavate :: Archive . new ( 'file.msi' ). extract Handle nested archives automatically:
# MSI → CAB → Files
Excavate :: Archive . new ( 'installer.msi' ). extract ( recursive_packages: true ) No System Dependencies Works without native tools:
No unzip, tar, or 7z required
Consistent behavior across platforms
Easy deployment
Consider keeping native tools when:
Maximum performance required
Very large archives (>1GB)
Advanced features needed (encryption, multi-volume)
Migration Checklist Identify archive formats in use
Replace format-specific code with Excavate
Test extraction results
Update error handling
Remove native tool dependencies