Affects Version/s: None
Fix Version/s: None
**Reported in Launchpad by Alexey Kopytov last update 13-01-2013 00:07:43
--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(FADV_DONTNEED) call, which is of course very inefficient.
The fix is to buffer the output compressed stream.