File Compression for Modern Computing

Command Line – zstd

© Lead Image © modella, 123RF.com

© Lead Image © modella, 123RF.com

Author(s):

In an effort to meet modern computing needs, zstd offers a greater degree of compression at a faster compression rate, with unique options to enhance performance.

Many standard Linux tools have been around so long that second-generation tools are being developed to meet modern needs. For instance, Neovim is an update of the Vim text editor, and apt is a rearrangement of the basic tools for apt-get, the Debian package manager. Similarly, Zstandard (zstd) [1] is a revision of compression tools like tar and gzip, except with higher degrees of compression at a faster rate. Additionally, zstd includes several unique tools for enhanced performance, such as advanced compression features, compression levels and strategies, and dictionaries.

zstd was written by Facebook employee Yann Collet and released in August 2016. Briefly, it is a lossless compression algorithm based loosely on the earlier LZ77 algorithm [2]. The command's syntax is deliberately similar to that of gzip, down to variations on the basic command that are the equivalent of popular options. For example, zstdmt is the same as zstd -T0 (use the same number of threads as detected cores), whereas unzstd is the same as zstd -d (decompress), and zstdcat is the same as zstd -dcf (decompress, force write to standard output, and overwrite without prompt).

The Basics

Getting started with zstd is as simple as typing:

[...]