Pigz - Multithreaded File Compression

Pigz is a multithreaded compression tool that can drastically increase the speed of compression. The only downside is that one has to tar the directory of files before being able to perform the compression. This results in the tar operation being the limiting factor in terms of speed.

Installation

sudo apt-get install pigz

Compress folder

FOLDER_TO_TAR=""
tar --create --file $FOLDER_TO_TAR.tar $FOLDER_TO_TAR
pigz --best $FOLDER_TO_TAR.tar

Extract

One can use the default "file roller" application to uncompress the directory, or just use either of the following commands

tar --extract --gzip --file $FOLDER_TO_TAR.tar.gz
pigz -d folder-to-tar.tar.gz && tar --extract --file $FOLDER_TO_TAR.tar

References

Hectic Geek - pigz: Multithreaded File Compression tool for Ubuntu Linux

No comments:

Post a Comment