pigz, which stands for Parallel Implementation of GZip, is a fully functional replacement for gzip that exploits multiple processors and multiple cores to the hilt when compressing data. pigz is approx 10x faster than regular GZip.
For Ubuntu 16.04 or early
apt update && apt install zlib1g-dev git clone https://github.com/madler/pigz.git cd pigz make mv pigz unpigz /usr/bin bash cd .. rm -r pigz
For Ubuntu 18.04 or later
apt install pigz