lzmat: add one byte to the max compressed length.

This works around a bug in LZMAT which manifests when attempting to
compress a buffer of random data one byte more than a multiple of 8.

Signed-off-by: Evan Nemerson <evan@coeus-group.com>
zlib: fix max compressed size for deflate and gzip.

compressBound gives the maximum compressed length for the zlib format,
but gzip is larger.  Instead, we should use deflateBound, which allows
us to set which codec to use.  Unfortunately, it's likely to be much
slower since we have to initialize a stream, so keep a special case for
zlib to use compressBound instead.

Signed-off-by: Evan Nemerson <evan@coeus-group.com>