pigz - file compressor, decompressor

Miscellaneous tools
Post Reply
Message
Author
labbe5
Posts: 2159
Joined: Wed 13 Nov 2013, 14:26
Location: Canada

pigz - file compressor, decompressor

#1 Post by labbe5 »

https://github.com/madler/pigz

Download it from Devuan/Debian/Ubuntu repositories.

To compress a file with default options, simply run:
pigz <path-to-file>

Man pages :
https://zlib.net/pigz/pigz.pdf

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#2 Post by p310don »

pigz is awesome.

I did some tests with it a few months ago.

Using gz to compress my 2 gig test tar file takes about 10 minutes. Using pigz takes 46 seconds, using 4 cores.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#3 Post by don570 »


p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#4 Post by p310don »

I made a script to test it.
Thanks don570

Not sure how or why you label it as a test/experiment program? Works great for me as is.

Funnily enough, I am working on a VM project and need to compress a 60gig file for portability. PIGZ and your script will make that process a lot quicker & easier.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#5 Post by don570 »

Not sure how or why you label it as a test/experiment program?
You can change the level of compression to speed it up.
You can rewrite the compression function in the script :lol:

I suggest some commands here...
http://murga-linux.com/puppy/viewtopic. ... 22#1050522
Instructions to use pigz in terminal...

cd into directory that you want to compress.
Code:
tar --use-compress-program="pigz --best --recursive" -cf ../archive.tar.gz *


or you can avoid CD into the folder with this command
where you just state the directory's name...

Code:
tar cf - "New Dir" | pigz -9 > archive.tar.gz

Post Reply