Skip to main content
7-Zip supports a wide range of archive formats for compression, packaging, and distribution. This page provides an overview of the major formats and their capabilities.

Supported Formats

7-Zip can create archives in the following formats:

7z

Native 7-Zip format with highest compression ratio

ZIP

Universal format with wide compatibility

TAR

Unix archive format, often combined with compression

GZIP

Single-file compression using Deflate algorithm

BZIP2

High-compression single-file format

XZ

Modern format with LZMA2 compression

WIM

Windows Imaging Format for system images

ISO

CD/DVD/BD image format

Format Categories

Archive Formats

These formats can store multiple files and directories with metadata:
  • 7z - Native format with the best compression ratio
  • ZIP - Most compatible, widely supported
  • TAR - Unix standard, preserves file permissions
  • WIM - Windows system image format
  • ISO - Optical disc image format

Compression-Only Formats

These formats compress single files or streams:
  • GZIP (.gz) - Fast compression, commonly used with TAR
  • BZIP2 (.bz2) - Better compression than GZIP
  • XZ (.xz) - Best compression, based on LZMA2

Format Comparison

The table below compares key features of different archive formats supported by 7-Zip.
FormatMultiple FilesCompression MethodsSolid ArchiveEncryptionMaximum Size
7zYesLZMA2, LZMA, BZip2, Deflate, PPMdYesAES-25616 EB
ZIPYesDeflate, Deflate64, BZip2, LZMA, PPMdNoAES-256, ZipCrypto16 EB (ZIP64)
TARYesNone (use with .gz/.bz2/.xz)N/ANoUnlimited
GZIPNoDeflateN/ANo4 GB
BZIP2NoBZip2N/ANoUnlimited
XZNoLZMA2N/ANo16 EB
WIMYesXPRESS, LZX, LZMAYesNo4 GB per image
ISOYesNoneN/ANo8 TB

Choosing the Right Format

For Maximum Compression

Use 7z format with LZMA2 compression and solid mode:
7z a -t7z -m0=lzma2 -mx=9 -ms=on archive.7z files/

For Maximum Compatibility

Use ZIP format with Deflate compression:
7z a -tzip -mm=Deflate archive.zip files/

For Unix/Linux Systems

Use TAR combined with XZ or GZIP:
7z a -ttar archive.tar files/
7z a -txz archive.tar.xz archive.tar

For Single File Compression

Use XZ for best compression or GZIP for speed:
7z a -txz file.txt.xz file.txt
7z a -tgzip file.txt.gz file.txt

Extraction Support

7-Zip can extract from many more formats than it can create, including:
  • RAR (including RAR5)
  • CAB, CHM, WIM
  • ARJ, LZH, CPIO, RPM, DEB
  • ISO, DMG, HFS
  • And many more…

Implementation Details

All format handlers are implemented in the source tree at:
CPP/7zip/Archive/
├── 7z/          # 7z format handler
├── Zip/         # ZIP format handler  
├── Tar/         # TAR format handler
├── Wim/         # WIM format handler
├── Iso/         # ISO format handler
├── GzHandler.cpp   # GZIP handler
├── Bz2Handler.cpp  # BZIP2 handler
└── XzHandler.cpp   # XZ handler
Each format handler implements the IInArchive and IOutArchive interfaces defined in IArchive.h.

Next Steps

7z Format Details

Learn about the native 7-Zip format structure

ZIP Format Details

Understand ZIP format capabilities

Build docs developers (and LLMs) love