2018-12-18 15:43:09 +00:00
|
|
|
# zstd
|
|
|
|
|
|
|
|
> Compress or decompress files with Zstandard compression.
|
2019-06-03 02:06:36 +02:00
|
|
|
> More information: <https://github.com/facebook/zstd>.
|
2018-12-18 15:43:09 +00:00
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- Compress a file into a new file with the `.zst` suffix:
|
2018-12-18 15:43:09 +00:00
|
|
|
|
2022-12-04 10:12:49 +01:00
|
|
|
`zstd {{path/to/file}}`
|
2018-12-18 15:43:09 +00:00
|
|
|
|
|
|
|
- Decompress a file:
|
|
|
|
|
2023-09-07 07:06:05 +02:00
|
|
|
`zstd --decompress {{path/to/file.zst}}`
|
2018-12-18 15:43:09 +00:00
|
|
|
|
2022-12-04 08:53:34 +01:00
|
|
|
- Decompress to `stdout`:
|
2018-12-18 15:43:09 +00:00
|
|
|
|
2023-09-07 07:06:05 +02:00
|
|
|
`zstd --decompress --stdout {{path/to/file.zst}}`
|
2018-12-18 15:43:09 +00:00
|
|
|
|
2020-06-23 15:25:45 -07:00
|
|
|
- Compress a file specifying the compression level, where 1=fastest, 19=slowest and 3=default:
|
2018-12-18 15:43:09 +00:00
|
|
|
|
2022-12-04 10:12:49 +01:00
|
|
|
`zstd -{{level}} {{path/to/file}}`
|
2018-12-18 15:43:09 +00:00
|
|
|
|
2020-06-23 15:25:45 -07:00
|
|
|
- Unlock higher compression levels (up to 22) using more memory (both for compression and decompression):
|
2018-12-18 15:43:09 +00:00
|
|
|
|
2022-12-04 10:12:49 +01:00
|
|
|
`zstd --ultra -{{level}} {{path/to/file}}`
|