Threaded implementation of gzip stream based on pigz.