A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
-bash/zsh: zstd command not not found # Windows (WSL2) sudo apt-get update sudo apt-get install zstd # Debian apt-get install zstd # Ubuntu apt-get install zstd # Alpine apk add zstd # Arch Linux pacman -S zstd # Kali Linux apt-get install zstd # Fedora dnf install zstd # OS X brew install zstd # Raspbian apt-get install zstd # Dockerfile dockerfile.run/zstd # Docker docker run cmd.cat/zstd zstd
Zstandard 是一种快速压缩算法,可提供高压缩比。它还提供了一种针对小数据的特殊模式,称为字典压缩。参考库提供了非常广泛的速度 / 压缩比权衡,并由极快的解码器支持。Zstandard 库以开源软件的形式提供,使用 BSD 许可证。其格式稳定,并以 IETF RFC 8878 的形式发布。
Zstandard 的格式稳定,并已记录在 RFC8878 中。目前已有多个独立实现。此存储库代表参考实现,以开源 BSD 或 GPLv2 许可的 C 库形式提供,以及用于生成和解码 .zst、.gz、.xz 和 .lz4 文件的命令行实用程序。如果您的项目需要其他编程语言,Zstandard 主页上提供了已知端口和绑定的列表。
-z, --compress Compress. This is the default operation mode when no operation mode option is specified and no other operation mode is implied from the command name (for example, unzstd implies --decompress). -d, --decompress, --uncompress Decompress. -t, --test Test the integrity of compressed files. This option is equivalent to --decompress --stdout > /dev/null, decompressed data is discarded and checksummed for errors. No files are created or removed. -b# Benchmark file(s) using compression level #. See BENCHMARK below for a description of this operation. --train FILES Use FILES as a training set to create a dictionary. The training set should contain a lot of small files (> 100). See DICTIONARY BUILDER below for a description of this operation. -l, --list Display information related to a zstd compressed file, such as size, ratio, and checksum. Some of these fields may not be available. This command´s output can be augmented with the -v modifier.
zstd 将文件压缩为带有
zstd path/to/file
zstd 解压缩文件:
zstd --decompress path/to/file.zst
zstd 解压缩到 stdout
:
zstd --decompress --stdout path/to/file.zst
zstd 压缩文件并指定压缩级别,其中 1=最快,19=最慢,3=默认:
zstd -level path/to/file
zstd 使用更多内存(用于压缩和解压缩)解锁更高的压缩级别(最高 22 级):
zstd --ultra -level path/to/file