OUR EXPERT
Shashank Sharma is a trial lawyer in Delhi, India. He’s been writing about open source software for 20 years, and lawyering for 10.
OUR EXPERT
Shashank Sharma is a trial lawyer in Delhi, India. He’s been writing about open source software for 20 years, and lawyering for 10.
Compressing files is one of the most mundane C activities, and frequently performed without much thought. For most Linux users, irrespective of distro, Gzip is the tool of choice. But it’s quite slow, especially with large files running into hundreds of megabytes or more. On modern multi-core machines, you can easily speed up compression with parallel processing. Cue Pigz.
Pigz achieves far faster compression because it puts the power of multi-core machines to proper use when compressing data.
Released under the permissive zib licence, Pigz is the brainchild of Mark Adler, who apart from his work with NASA on the Spirit Mars Exploration Rover, has contributed to the development of the PNG image format, and developed both zlib and the Gzip utility along with Jean-lop Gailly.
As a parallel implementation of Gzip, Pigz has all the features of Gzip at its disposal. So, you can define the level of compression, with -1 being the fastest and -9 the slowest. Of course, the fastest level offers the least amount of compression, and the highest level offers the most. Pigz defaults to level 6, the same as Gzip.
Pigz is faster than Gzip as it spreads work over multiple processors and cores when compressing.