Use the following tar command to open a Zstandard tarball. $ tar -zstd -cf /home/linuxnightlyĪlternatively, we could use the a option with the tar command, which will choose the correct compression method based on the file extension ( zst in this case) specified. You’ll need to add the -zstd option, along with any other flags you choose. If you want to compress a directory, or combine multiple files into a single archive, you’ll need to use tar to create an archive and then compress it with zstd. You could also use the unzstd command instead. To decompress a zstd archive, use the -d option. You can create a compressed zstd archive of a single file by using the following syntax. Ubuntu, Debian, and Linux Mint: $ sudo apt install zstdįedora, AlmaLinux, CentOS, and RHEL: $ sudo dnf install zstdĪrch Linux and Manjaro: $ sudo pacman -S zstdĬheck out some of the commands below to see how to use Zstandard compression on Linux, which will involve the zstd command and tar command.Įxample 1. If not, use the appropriate command below to install it with your system’s package manager. Your Linux distribution may already have Zstandard installed by default. But hey, Zstandard cares more about fast results, and I’m sure many of you do as well. Even when using its maximum compression level setting, it can’t match the size reduction offered by xz and 7-zip. Now, Zstandard is not the new answer to everything. Contrast this with gzip, which took a full extra minute to do the same job, and still couldn’t reduce the size as drastically. It only took 43 seconds to compress 1350 MB into 934 MB. In our compression benchmark tests, Zstandard was significantly faster than gzip, bzip2, xz, 7-zip, and a couple other compression methods. “ Why use Zstandard? I already use gzip (or xz or 7-zip) compression.” Well, zstd is fast. In the Linux world, official adoption of new standards can be rather slow, but Zstandard is seeing big support by distros such as Arch Linux, which switched from xz to Zstandard for package compression in the official repository back in 2019. Since then, Zstandard has been continuously used by the company to compress large amounts of data. Zstandard was created by a developer at Facebook. Zstandard (often abbreviated to zstd) was released in 2015 and since then has risen sharply in popularity. They’ve been around for a while, and most everyone has at least stumbled across them by now, if they’re not actively using them on a regular basis.Īs if there weren’t enough already, there’s a newcomer in the compression arena. As a Linux user, you’re probably already familiar with longtime staples like gzip, bzip2, and xz.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |