Install Zstandard Fast Linux Compression Tool on CentOS, RHEL and Ubuntu
In this tutorial we’ll install Zstandard – zstd on Linux Distros and Servers, zstd will compress and decompress file very quickly and the size of compressed file will be smaller than any other compression tool.
Zstandard is a real-time compression algorithm, providing high compression ratios. It offers a very wide range of compression / speed trade-off, while being backed by a very fast decoder (see benchmarks below). It also offers a special mode for small data, called dictionary compression, and can create dictionaries from any sample set. Zstandard library is provided as open source software using a BSD license.
Install zstandard :-
Centos/RHEL :
yum install zstd
Ubuntu/Debian :
apt-get install zstd
Install Latest version of zstd from source :
Installing required packages for building from from source :-
Centos/RHEL :
yum groupinstall "Development Tools"
Ubuntu/Debian :
apt-get install build-essential
Now install zstd from source :
wget https://github.com/facebook/zstd/archive/dev.zip unzip dev.zip cd zstd-dev make install
Command usage :
check version for zstd :
zstd --version
Use zst followed by the filename to compress. This will create a compressed file with appending .zst extension to the original filename.
zstd yourfile
To specify the output compressed with your file name use with -o
flag:
zstd yourfile -o newfilename.zst
To uncompress the file which is compressed with zstandard use with -d
flag:
zstd -d yourfile.zst or unzstd yourfile.zst