This repo contains a Go port of gunzip for decompression of .gz files.
Below shows runtime comparison with the go standard library implementation (compress/gzip).
| # Gorutines | compress/gzip | This |
|---|---|---|
| 1 | 4.22 | 3.92 |
| 2 | 3.60 |
| # Gorutines | compress/gzip | This |
|---|---|---|
| 1 | 3.88 | 3.98 |
| 2 | 6.01 |
For whatever the reason, the multi-thread version runs slower on arm64 (Apple Silicon).
$ go build# single gorutine
GOMAXPROC=1 ./gunzip < compressed.gz > decompressed
# two gorutines
GOMAXPROC=2 gunzip -t < compressed.gz > decompressed