Compression benchmarks 2017

As I had to send a disk based backup to another machine on a local network, I wanted to compress the backup data before sending it over the wire, of course. And as the last benchmark has been done one year ago, it was time for another one anyway :-)

$ ls -hgo disk.img
 -rw------- 1 861M Oct 25 23:02 disk.img

$ ./compress-test.sh -n 3 -f disk.img | tee foo.out

$ ./compress-test.sh -r foo.out
### Fastest compressor:
### pzstd/1c:      .75 seconds / 61.900% smaller 
### pigz/1c:      3.25 seconds / 60.100% smaller 
### zstd/1c:      3.25 seconds / 62.000% smaller 
### bro/1c:       3.50 seconds / 59.500% smaller 
### pzstd/9c:     6.00 seconds / 67.700% smaller 
### pigz/9c:     11.00 seconds / 63.800% smaller 
### gzip/1c:     12.00 seconds / 59.900% smaller 
### zstd/9c:     17.50 seconds / 68.000% smaller 
### pbzip2/9c:   18.00 seconds / 67.400% smaller 
### pbzip2/1c:   27.50 seconds / 64.900% smaller 
### lzma/1c:     53.50 seconds / 68.700% smaller 
### xz/1c:       54.75 seconds / 68.700% smaller 
### gzip/9c:     65.00 seconds / 63.700% smaller 
### bzip2/1c:    66.00 seconds / 64.900% smaller 
### bzip2/9c:    66.00 seconds / 67.500% smaller 
### bro/9c:      83.25 seconds / 70.500% smaller 
### lzma/9c:    240.50 seconds / 76.700% smaller 
### xz/9c:      243.75 seconds / 76.700% smaller 

### Smallest size:
### xz/9c:      243.75 seconds / 76.700% smaller 
### lzma/9c:    240.50 seconds / 76.700% smaller 
### bro/9c:      83.25 seconds / 70.500% smaller 
### xz/1c:       54.75 seconds / 68.700% smaller 
### lzma/1c:     53.50 seconds / 68.700% smaller 
### zstd/9c:     17.50 seconds / 68.000% smaller 
### pzstd/9c:     6.00 seconds / 67.700% smaller 
### bzip2/9c:    66.00 seconds / 67.500% smaller 
### pbzip2/9c:   18.00 seconds / 67.400% smaller 
### pbzip2/1c:   27.50 seconds / 64.900% smaller 
### bzip2/1c:    66.00 seconds / 64.900% smaller 
### pigz/9c:     11.00 seconds / 63.800% smaller 
### gzip/9c:     65.00 seconds / 63.700% smaller 
### zstd/1c:      3.25 seconds / 62.000% smaller 
### pzstd/1c:      .75 seconds / 61.900% smaller 
### pigz/1c:      3.25 seconds / 60.100% smaller 
### gzip/1c:     12.00 seconds / 59.900% smaller 
### bro/1c:       3.50 seconds / 59.500% smaller 

### Fastest decompressor:
### pzstd/dc:      .25 seconds
### zstd/dc:      1.00 seconds
### bro/dc:       2.25 seconds
### pigz/dc:      2.75 seconds
### gzip/dc:      4.25 seconds
### pbzip2/dc:    5.00 seconds
### lzma/dc:     14.25 seconds
### xz/dc:       15.25 seconds
### bzip2/dc:    20.75 seconds
Now the only thing left is to extend our little benchmark scripts to actually compare these to last year's results...