clue · GitHub

For the reference, here's what the output looks like on my machine:

$ php examples/91-benchmark-compress.php
Compressed 1073741824 bytes in 5.9s => 180.6 MB/s
$ LANG=C dd if=/dev/zero bs=1M count=1k status=progress | gzip > /dev/null
888143872 bytes (888 MB, 847 MiB) copied, 4 s, 222 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 4.83222 s, 222 MB/s
$ dd if=/dev/zero bs=1M count=1k status=none | gzip > null.gz
$ php examples/92-benchmark-decompress.php null.gz
Decompressed 1073741824 bytes in 3.4s => 314.8 MB/s
$ gunzip < null.gz | LANG=C dd of=/dev/zero status=progress
918094336 bytes (918 MB, 876 MiB) copied, 3 s, 306 MB/s
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.50428 s, 306 MB/s

Read the original on github.com ↗