[Bug 3603553]: Ensure that data gets written to the underlying stream by
compressing transforms when the amount of data to be written is one
buffer's-worth; problem was particularly likely to occur when compressing
large quantities of not-very-compressible data.

Many thanks to Piera Poggio (vampiera) for reporting.
Correction to comment in re key buffer size.
Fix [Bug 3603553].