diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2008-01-16 19:20:21 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2008-01-16 19:20:21 (GMT) |
commit | 8dab665567c9dffaa3f5fea198fc2110d536594d (patch) | |
tree | 78bac4e928b25e139605aceefa82537f378d8af0 /libpng/compress.c | |
parent | d3461a1c31f008345d784dc3e819047bc5265c30 (diff) | |
download | Doxygen-8dab665567c9dffaa3f5fea198fc2110d536594d.zip Doxygen-8dab665567c9dffaa3f5fea198fc2110d536594d.tar.gz Doxygen-8dab665567c9dffaa3f5fea198fc2110d536594d.tar.bz2 |
Release-1.5.4
Diffstat (limited to 'libpng/compress.c')
-rw-r--r-- | libpng/compress.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/libpng/compress.c b/libpng/compress.c index fcd0fa8..df04f01 100644 --- a/libpng/compress.c +++ b/libpng/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 + * Copyright (C) 1995-2003 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ +#define ZLIB_INTERNAL #include "zlib.h" /* =========================================================================== @@ -18,7 +19,12 @@ memory, Z_BUF_ERROR if there was not enough room in the output buffer, Z_STREAM_ERROR if the level parameter is invalid. */ -int ZEXPORT compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level) +int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong sourceLen; + int level; { z_stream stream; int err; @@ -53,7 +59,21 @@ int ZEXPORT compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong /* =========================================================================== */ -int ZEXPORT compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) +int ZEXPORT compress (dest, destLen, source, sourceLen) + Bytef *dest; + uLongf *destLen; + const Bytef *source; + uLong 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; +} |