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

28 lines
501 B
Markdown
Raw Permalink 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.

# lz4
> 压缩或解压缩 .lz4 文件。
> 更多信息:<https://github.com/lz4/lz4>。
- 压缩文件:
`lz4 {{path/to/file}}`
- 解压缩文件:
`lz4 -d {{file.lz4}}`
- 解压缩文件并写入 `stdout`
`lz4 -dc {{file.lz4}}`
- 打包并压缩一个目录及其内容:
`tar cvf - {{path/to/directory}} | lz4 - {{dir.tar.lz4}}`
- 解压缩并解包一个目录及其内容:
`lz4 -dc {{dir.tar.lz4}} | tar -xv`
- 使用最佳压缩率压缩文件:
`lz4 -9 {{path/to/file}}`