Files
tldr/pages.zh/common/zstd.md

24 lines
613 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# zstd
> 使用 Zstandard 压缩对文件进行压缩或解压缩。
> 更多信息:<https://github.com/facebook/zstd>。
- 将文件压缩为一个新的 `.zst` 后缀文件:
`zstd {{path/to/file}}`
- 解压缩文件:
`zstd --decompress {{path/to/file.zst}}`
- 解压缩到 `stdout`
`zstd --decompress --stdout {{path/to/file.zst}}`
- 压缩文件时指定压缩级别,其中 1=最快19=最慢3=默认:
`zstd -{{level}} {{path/to/file}}`
- 使用更多内存(压缩和解压缩均需)解锁更高的压缩级别(最高可达 22
`zstd --ultra -{{level}} {{path/to/file}}`