How to measure compression speed with pv

It's easy to compress things on the command line with linux. All you need to do is gzip file > file.gz. You can use other compression programmes, like bzip2 and lzma. Each has a different way to compress and some are faster than others.

You can measure this using pv a convient little command line tool that shows a progress bar through a pipe.

Example: gzip file | pv > file.gz

Related: pv and fifos to measure the speed of anything

This entry is tagged: