zstd
Archives
Usage
zstd [-<level>] [-T0] <file>The modern one: it reaches gzip’s size several times faster, and at `-19` it lands near xz sizes in a fraction of xz’s time; unlike gzip it keeps the source file by default (`--rm` deletes it), `-T0` uses every core, and tar calls it with `--zstd`.
Common flags
| Flag | Meaning |
|---|---|
| -1 .. -19 | Level. --ultra -22 goes further but costs a lot of memory. |
| -T0 | Use every core. |
| -d | Decompress; unzstd and zstdcat also exist. |
| --rm | Delete the source after success. Unlike gzip, zstd keeps it by default. |
| -c | Write to stdout. |
| -l | Show what is inside a .zst file. |
| --long=27 | A large window that helps a lot on big, repetitive files. |
Examples
zstd -19 -T0 dump.sqlNear-xz size at a fraction of the time; dump.sql stays where it is.
tar --zstd -cf backup.tar.zst ./dataA tar archive compressed with zstd.
zstd -d backup.tar.zstUnpack it again.
Bundling and compressing are separate jobs: tar bundles, gzip shrinks, and .tar.gz is both.
How to read this
- Square brackets [ ] mark a part you may leave out.
- An ellipsis … means you can list more than one.
- Flags are case-sensitive — in some commands -r and -R do different things.
Questions
Q. What does zstd do?
The modern one: it reaches gzip’s size several times faster, and at `-19` it lands near xz sizes in a fraction of xz’s time; unlike gzip it keeps the source file by default (`--rm` deletes it), `-T0` uses every core, and tar calls it with `--zstd`.
Q. How do I type it?
zstd [-<level>] [-T0] <file> — square brackets mark the parts you can leave out.
Q. How many flags are worth knowing?
7 are listed here; the full set is in man zstd. This command sits under Archives.
Related commands
man page: man zstd