![]() We invite you to give it a shot and tell us how it went. We went further and compared Pigz with Gzip and found out that Pigz is the better of the two in terms of speed of both compression and decompression. We have covered the pigz command-line tool and showed you how you can compress and decompress files. $ man pigzįurthermore, run the command below to view all the options available for use with pigz command. This implies that the Pigz command-line tool is much faster than the Gzip toolįor more details on the usage of pigz command, visit the man pages. Here are the results: Gzip Compression $ time gzip Ĭheck Gzip Compression Time Pigz Compression $ time pigz Ĭheck Pigz Compression Time Gzip Decompression $ time gzip -d Ĭheck Gzip Decompression Time Pigz Decompression $ time unpigz įrom the comparison, we can clearly see that compression and decompression times for Pigz are much shorter than Gzip. We went a bit further and pitted Pigz against Gzip tool. Using our compressed ISO file, the command will be: $ pigz -d ĭecompress Files in Linux Comparison between Pigz vs Gzip To decompress a file or directory using pigz, use the -d option or the unpigz command. As this library compresses files mono-threaded, id like to know if there is a way to do this multi-threaded. However, it takes really long (> 12 hours) to compress, because i compress around 20GB of files a day. ![]() In this example, below, we have used the best compression (denoted by -9) with 4 processors (-p4) while retaining the original file (-k). 4 im using Apache Commons Compress for Java to compress multiple log files to a single tar.bz2 archive. You can specify the number of cores to be used using the -p option. We mentioned earlier that the pigz utility tool uses multiple cores & processors when compressing files. To compress a directory, use the -use-compress-program argument as shown: $ tar -use-compress-program="pigz -k " -cf dir1Ĭompress a Directory in Linux How to Limit the Number of Processors While Compressing As a workaround, pigz is used in conjunction with tar command to zip directories.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |