# How can parallel gzip (e.g., pigz) be used by mrtrix programs?

**URL:** <https://community.mrtrix.org/t/how-can-parallel-gzip-e-g-pigz-be-used-by-mrtrix-programs/1504>\
**Category:** Uncategorized\
**Created:** [March 6, 2018, 4:58am UTC](https://community.mrtrix.org/t/how-can-parallel-gzip-e-g-pigz-be-used-by-mrtrix-programs/1504 "2018-03-06T04:58:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiook\_Cha](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jiook_cha/32/2485_2.png) [@Jiook\_Cha](https://community.mrtrix.org/u/Jiook_Cha)\
**Post date:** [March 6, 2018, 4:58am UTC](https://community.mrtrix.org/t/how-can-parallel-gzip-e-g-pigz-be-used-by-mrtrix-programs/1504/1 "2018-03-06T04:58:42Z")

</div>

Hello,

I would like to shorten the processing time by using parallel gzip, such as pigz. Is there an easy way for a mrtrix program to recognize pigz?

---

<div class="post-metadata">

**Author:** ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Post date:** [March 6, 2018, 3:36pm UTC](https://community.mrtrix.org/t/how-can-parallel-gzip-e-g-pigz-be-used-by-mrtrix-programs/1504/2 "2018-03-06T15:36:28Z")

</div>

Interesting suggestion, I hadn’t heard about this. It would be good to use something like this, but we can’t use that implementation in _MRtrix3_ – at least not without major changes to how we handle gzip files. The problem is that this is a standalone executable, a replacement for the gzip / gunzip programs. But _MRtrix3_ links against the libz library, and does its compression / decompression in RAM within process, not via an external executable. Are you aware of any drop-in replacements for the zlib library itself? If those exist, then it might be trivial to simply link against it…
