tldr/pages.zh/common/zstd.md

25 lines
574 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# zstd
> 使用 Zstandard 压缩来压缩 / 解压文件。
> 更多信息:<https://github.com/facebook/zstd>.
- 将一个文件压缩到一个 `.zst` 后缀的压缩文件中:
`zstd {{file}}`
- 解压缩一个文件:
`zstd -d {{file}}.zst`
- 将文件解压缩到标准输出(`stdout`
`zstd -dc {{file}}.zst`
- 使用指定的压缩等级来压缩一个文件.0 = 最差19 = 最好(默认等级是 3
`zstd -{{level}} {{file}}`
- 使用更多内存(解压或压缩时)来得到更高的压缩比:
`zstd --ultra -{{level}} {{file}}`