Gzip is the universal default, xz aims for a smaller result at higher cost, and Zstandard is built around adjustable speed with good compression. All three compress a single stream, so for several files you normally combine them with TAR.
Three formats, three goals
Gzip is defined in RFC 1952 and uses DEFLATE. It was designed to be simple, fast and easy to stream, and it became ubiquitous in web servers, log rotation and TAR.GZ archives. XZ is a container around LZMA2, documented by the XZ project, aimed at strong compression ratios. Zstandard is specified in RFC 8478 and was designed, in the words of its reference implementation, to offer a wide range of compression levels while staying fast on both compression and decompression.
| Property | gzip | xz | Zstandard |
|---|---|---|---|
| Underlying method | DEFLATE | LZMA2 | Zstandard codec |
| Typical goal | Fast, universal | Small output | Tunable speed and good ratio |
| Integrity check | CRC-32 | Configurable checks including CRC32 and CRC64 | Optional checksum in the frame |
| Multiple members / frames | Concatenated members | Streams with block structure | Frames, including skippable frames |
| Dictionary support | No | No in the usual file format | Yes |
| Common extension | .gz | .xz | .zst |
| Paired with TAR as | .tar.gz / .tgz | .tar.xz / .txz | .tar.zst |
Speed and ratio: a trade-off, not a winner
Compression involves finding repeated patterns. Simple algorithms find them quickly but may miss distant repeats; more complex algorithms find more repeats but use more CPU and memory. Gzip sits at the fast and simple end. XZ/LZMA2 tends to compress text and structured data very well, with more work on the way in and out. Zstandard spans a range of levels, so it can be configured for very fast compression or for a better ratio.
Avoid universal claims such as one format is always fastest. Results depend on the data, the level and the implementation. Aback ZIP publishes its own decode measurements in docs/BENCHMARKS.md: on the project's Apple Silicon test machine, Zstandard decoded at roughly 110 to 540 MB/s, XZ at roughly 13 to 80 MB/s and up to around 380 MB/s on long runs, with BZIP2 in between. Those ranges come from one benchmark environment with varying data, not from a general specification or a promise about your device.
Benchmark numbers are useful for orientation. Re-run them on your own data before making a performance decision.
Memory and streaming behaviour
All three formats can be processed as streams: you do not need to load the whole compressed file before decoding starts. The practical difference is working memory. Gzip's DEFLATE window is modest. XZ decoders allocate memory related to the dictionary size recorded in the stream, which can matter on small devices. Zstandard also has a window size, and its frame header tells a decoder how much history it may need.
- Server logs: gzip is easy to produce and consume in almost any language or web server.
- Large text datasets: xz can save meaningful space when the data is stored for a long time and decompressed rarely.
- High-throughput services: Zstandard's speed and level range make it attractive when compression happens on the hot path.
- Very small devices: check the declared window or dictionary size before decoding; memory limits are a real constraint.
Dictionaries deserve a separate note. Zstandard can use a trained dictionary to compress many small, related messages efficiently: instead of repeating shared patterns in every message, the encoder refers to a common dictionary that the decoder already has. This is useful in APIs and backups of small records. It also means a compressed stream is not self-contained; a decoder without the matching dictionary cannot read it. Gzip and xz file formats do not offer that feature, which makes their outputs simpler to exchange.
All three formats support streaming, but the surrounding conventions differ. Gzip files can be concatenated, and many tools treat the members as one logical stream. Zstandard defines skippable frames so other data can sit alongside compressed frames in the same file. XZ uses a stream structure with block headers and an index. These details matter when you build a pipeline rather than compress one file by hand: confirm that your reader handles the same conventions as your writer.
Integrity and error detection
Gzip stores a CRC-32 of the uncompressed data in its trailer. XZ streams carry configurable integrity checks, commonly CRC32 or CRC64. Zstandard frames can include a checksum that covers the frame's content. None of these checks is a cryptographic signature: they detect accidental damage and some forms of tampering, not a determined attacker who can recompute them.
For files that cross trust boundaries, keep a separate cryptographic hash produced by a tool you trust and delivered by a different channel. For an archive that also needs confidentiality, encryption is a separate control with its own authentication mechanism. Neither the CRC in a gzip trailer nor a checksum in a Zstandard frame proves who created the file.
Compatibility and tooling
Gzip is available almost everywhere: command-line tools, web servers, programming libraries and browser APIs. XZ support is widespread on Linux and in development tooling but less universal on stock Windows and macOS. Zstandard support has grown quickly in Linux distributions, package managers and developer tools, but it is still less universal than gzip.
| If you need to... | Pick | Why |
|---|---|---|
| Share with an arbitrary recipient | gzip | Highest chance the other side can decode it |
| Archive a source release | TAR.GZ or TAR.XZ | Both are familiar in packaging ecosystems |
| Serve compressed web content | gzip or Zstandard | Both are widely supported in HTTP; check what your clients accept |
| Minimise a large static download | xz or high-level Zstandard | Better ratios on compressible data |
| Process files in Aback ZIP | gzip for encoding; all three for decoding | That is the tool's current support boundary |
What Aback ZIP supports
GZIP Compress & Extract can compress a file into .gz at a chosen level and decompress it back, restoring the stored name. XZ, BZ2 & ZST Extractor decompresses .xz, .bz2, .zst, .lzma and .gz files and verifies built-in checks where the format provides them. Compressed TARs are recognised and can be opened with Extract TAR.
Creating .xz and .zst files is not supported. Zstandard files that need a dictionary and XZ files using BCJ executable filters are not supported either. Zstandard checksums are not verified by the current decoder.
If the result must be a ZIP that opens on Windows or macOS, decode the compressed stream and repackage the files with TAR to ZIP or Create ZIP. For a broader map of where these formats sit, see Archive formats explained.
A practical decision rule
- Will the recipient definitely have the decoder? If not, choose gzip.
- Is the data mostly text and will it be stored for a long time? Consider xz.
- Does compression happen repeatedly in an application where latency matters? Consider Zstandard.
- Are you compressing several files? Wrap a TAR first, then compress the TAR.
- Do you need to verify the result? Keep a separate SHA-256 hash regardless of the format's own check.
None of these formats is an archive manager by itself. They shrink bytes; TAR and ZIP handle file lists. Keeping that distinction in mind prevents most bad format choices.