Built-in compression does inefficient I/O
--compress does 4 unbuffered I/O operations per every 64K block of uncompressed data:
- it first writes an 8-byte compressed block header
- then it writes an 8-byte file offset
- then it writes a 4-byte checksum
- finally the compressed contents of the original 64K block is written
Each write is followed by a posix_fadvise(
The fix is to buffer the output compressed stream.