Fix zlib deflate usage
Fix zlib deflate usage

Deflate may return Z_OK even when not all data has been compressed
if the output buffer becomes full.

In practice this is very unlikely to happen because the output buffer
size is always some KBs larger than the size of the data passed for
compression from the upper layers and I think that zlib never expands
the data so much, even on the worst cases.

Anyway, this patch plays on the safe side checking that the output
buffer is not exhausted.

Signed-off-by: Salvador <5ecce90467b567e4d7ffb8bd767bd4a614f3ee53@yahoo.com>

libssh2/libssh2,libssh2/libssh2,libssh2/libssh2,libssh2/libssh2