zstd

zstd (Zstandard) is een modern compressie-algoritme: sneller dan gzip, bijna zo goed als xz.

Basisgebruik

zstd bestand.txt              # Naar bestand.txt.zst
zstd -d bestand.txt.zst       # Decomprimeren
zstd -k bestand.txt           # Origineel bewaren

Opties

OptieBetekenis
-dDecomprimeren
-kBewaar origineel
-n (1–22)Compressieniveau (standaard: 3)
-19Hoog niveau
--ultra -22Maximale compressie
-T nAantal threads
-rRecursief
--progressVoortgang tonen

Voorbeelden

Snel comprimeren:

zstd bestand.txt

Maximale compressie:

zstd --ultra -22 groot-bestand.sql

Met meerdere threads:

zstd -19 -T 0 bestand.tar

Met tar:

tar -I zstd -cf archief.tar.zst map/
tar -I zstd -xf archief.tar.zst

Vergelijking met gzip

# gzip: ~100 MB/s compressie
# zstd (niveau 3): ~500 MB/s, betere compressieverhouding

Tip

zstd is de beste keuze als snelheid én compressieverhouding beide tellen — het is de standaard in moderne systemen zoals Linux-kernel en Facebook's infrastructure.

compressiebestanden