Package archiver facilitates convenient, cross-platform, high-level archival and compression operations for a variety of formats and compression algorithms.
Features:
stream-oriented APIs
automatically identify archive and compression formats
traverse directories, archive files, and any other file uniformly as
io/fs
file systemscompress and decompress files
create and extract archive files
walk or traverse into archive files
extract only specific files from archives
insert (append) into .tar and .zip archives
read from password-protected 7-Zip files
numerous archive and compression formats supported
extensible (add more formats just by registering them)
cross-platform, static binary
pure Golang (no cgo)
multithreaded Gzip
adjust compression levels
automatically add compressed files to zip archives without re-compressing
open password-protected rar archives
Supported compression formats:
brotli (.br)
bzip2 (.bz2)
flate (.zip)
gzip (.gz)
lz4 (.lz4)
lzip (.lz)
snappy (.sz)
xz (.xz)
zlib (.zz)
zstandard (.zst)
Supported archive formats:
.zip
.tar (including any compressed variants like .tar.gz)
.rar (read-only)
.7z (read-only)