• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Wednesday, June 25, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

zstd – A Fast Data Compression Algorithm Used By Facebook

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
175
VIEWS
Share on FacebookShare on Twitter

Contents

  1. How to Install Zstandard Compression Tool in Linux
  2. Learn 10 Zstd Command Usage Examples in Linux

Zstandard (also known as zstd) is a free open source, fast real-time data compression program with better compression ratios, developed by Facebook. It is a lossless compression algorithm written in C (there is a re-implementation in Java) – its thus a native Linux program.

Read Also: 10 7zip (Data Comperssion) Command Examples in Linux

When required, it can trade compression speed for stronger compression ratios (compression speed vs compression ratio trade-off can be configured by small increments), vice versa. It has a special mode for small data compression, known as dictionary compression, and can build dictionaries from any sample set provided. It comes with a command line utility for creating and decoding .zst, .gz, .xz and .lz4 files.

Importantly, Zstandard has a rich collection of APIs, supports almost all popular programming languages including Python, Java, JavaScript, Nodejs, Perl, Ruby, C#, Go, Rust, PHP, Switft, and lots more.

It is actively used to compress large volumes of data in multiple formats and use cases in Facebook; services such as Amazon Redshift data warehousing; databases such as Hadoop and Redis; the Tor network and many other applications including games.

The following results are obtained by doing several fast compression algorithms tests on a server running Linux Debian using lzbench, an open-source in-memory benchmark tool.

zstd – A Fast Data Compression Algorithm Used By Facebook

Zstandard Compression Testing

How to Install Zstandard Compression Tool in Linux

To install Zstandard on a Linux distribution, you need to compile it from sources, but before that first you need to install the necessary development tools on your system using your distribution package manager as shown.

$ sudo apt update && sudo apt install build-essential		#Ubuntu/Debian
# yum group install "Development Tools" 			#CentOS/REHL
# dnf groupinstall "C Development Tools and Libraries"		#Fedora 22+

Once all the needed development tools installed, now you can download the source package, move into the local repo directory, build the binary and install it as shown.

$ cd ~/Downloads
$ git clone https://github.com/facebook/zstd.git
$ cd zstd
$ make
$ sudo make install 

Once Zstandard installed, now we can move further to learn some basic usage of Zstd command examples in the following section.

Learn 10 Zstd Command Usage Examples in Linux

Zstd’s command line syntax is generally similar to that of gzip and xz tools, with a few differences.

1. To create a .zst compression file, simply provide a filename to compress it or use the -z flag also means compress, which is the default action.

$ zstd etcher-1.3.1-x86_64.AppImage 
OR
$ zstd -z etcher-1.3.1-x86_64.AppImage 

2. To decompress a .zst compression file, use the -d flag or the unzstd utility as shown.

$ zstd -d etcher-1.3.1-x86_64.AppImage 
OR
$ unzstd etcher-1.3.1-x86_64.AppImage 

3. To remove source file after an operation, by default, the source file is not deleted after successful compression or decompression, to delete it, use the --rm option.

$ ls etcher-1.3.1-x86_64.AppImage
$ zstd --rm  etcher-1.3.1-x86_64.AppImage
$ ls etcher-1.3.1-x86_64.AppImage

4. To set a compression level, zstd has a number of operation modifiers, for instance you can specify a compression level as -6(a number 1-19, default is 3) as shown.

$ zstd -6 --rm etcher-1.3.1-x86_64.AppImage

5. To set a compression speed, zstd has a compression speed ratio 1-10, the default compression speed is 1. You can trade compression ratio for compression speed with the --fast option, the higher the number the faster the compression speed.

$ zstd --fast=10 etcher-1.3.1-x86_64.AppImage

6. To display information about a compressed file, use the -l flag, which is used to display information about a compressed file, for example.

$ zstd -l etcher-1.3.1-x86_64.AppImage.zst

7. To test the integrity of a compressed files, use the -t flag as shown.

$ zstd -t etcher-1.3.1-x86_64.AppImage.zst

8. To enable verbose mode, use the -v option.

$ zstd -v -5 etcher-1.3.1-x86_64.AppImage

9. To use other file compression or decompression formats such as gzip, xz, lzma, and lz4, using the --format=FORMAT as shown.

$ zstd -v --format=gzip etcher-1.3.1-x86_64.AppImage
$ zstd -v --format=xz  etcher-1.3.1-x86_64.AppImage

10. To set a zstd process priority to real-time, you can use the option –priority=rt as shown.

$zstd --priority=rt etcher-1.3.1-x86_64.AppImage

The -r flag instructs zstd to operate recursively on dictionaries. You can find lots of useful and advanced options, how to read or create dictionaries by consulting the zstd man page.

$ man zstd

Zstandard Github Repository: https://github.com/facebook/zstd

Zstandard is a fast real-time, lossless data compression algorithm and compression tool which offers high compression ratios. Try it out and share your thoughts about it or ask questions via the feedback form below.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

WebHostingPad Review

Next Post

How to Download and Extract Tar Files with One Command

Next Post

How to Download and Extract Tar Files with One Command

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In