diff options
author | pixel <pixel> | 2005-06-06 11:16:15 +0000 |
---|---|---|
committer | pixel <pixel> | 2005-06-06 11:16:15 +0000 |
commit | 863e6a84a38d3d02211f704a8430e86add6514ed (patch) | |
tree | bdf51e5fd58336eddcfd9b7bbc478fa6ab7181e2 /lib/zlib/src/compress.c | |
parent | 2188dfc8e9c0406af3e7ab0152ea6eb837ad5c1c (diff) |
Updated zlib, adding hashing functions, and introducing first bits of a new sliding window generic algorithm.
Diffstat (limited to 'lib/zlib/src/compress.c')
-rw-r--r-- | lib/zlib/src/compress.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/zlib/src/compress.c b/lib/zlib/src/compress.c index 439c5e1..cd7e3d7 100644 --- a/lib/zlib/src/compress.c +++ b/lib/zlib/src/compress.c @@ -1,10 +1,11 @@ /* compress.c -- compress a memory buffer * Copyright (C) 1995-2002 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h + * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: compress.c,v 1.3 2004-11-27 21:46:13 pixel Exp $ */ +/* @(#) $Id: compress.c,v 1.4 2005-06-06 11:16:16 pixel Exp $ */ +#define ZLIB_INTERNAL #include "zlib.h" /* =========================================================================== @@ -66,3 +67,13 @@ int ZEXPORT compress (dest, destLen, source, sourceLen) { return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); } + +/* =========================================================================== + If the default memLevel or windowBits for deflateInit() is changed, then + this function needs to be updated. + */ +uLong ZEXPORT compressBound (sourceLen) + uLong sourceLen; +{ + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; +} |