[PATCH] Revert to using zlib-provided compress bound
From: Michael Spang <spang_at_google.com>
Date: Fri, 6 Aug 2010 12:06:40 -0700
We have a local definition of zlib's compressBound which is not in
This reverts to using the zlib-provided version, since the old version
--- subversion/libsvn_delta/svndiff.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/subversion/libsvn_delta/svndiff.c b/subversion/libsvn_delta/svndiff.c index bf6afa9..c0187b5 100644 --- a/subversion/libsvn_delta/svndiff.c +++ b/subversion/libsvn_delta/svndiff.c @@ -31,11 +31,6 @@ #include "svn_private_config.h" #include <zlib.h> -/* This macro is taken from zlib, and was originally the function - compressBound. It shouldn't ever change, but once every millenium, - it may be useful for someone to make sure. */ -#define svnCompressBound(LEN) ((LEN) + ((LEN) >> 12) + ((LEN) >> 14) + 11) - /* For svndiff1, address/instruction/new data under this size will not be compressed using zlib as a secondary compressor. */ #define MIN_COMPRESS_SIZE 512 @@ -152,7 +147,7 @@ zlib_encode(const char *data, apr_size_t len, svn_stringbuf_t *out) } else { - svn_stringbuf_ensure(out, svnCompressBound(len) + intlen); + svn_stringbuf_ensure(out, compressBound(len) + intlen); endlen = out->blocksize; if (compress2((unsigned char *)out->data + intlen, &endlen, -- 1.7.1Received on 2010-08-06 21:21:31 CEST |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.