diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-03-18 10:11:29 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-03-18 10:11:29 +0000 |
commit | 6121dc77366dbc5b7fe28e6d405e498e79630c15 (patch) | |
tree | da2e2000ca12b6e2c1c739f123d867b0f182c841 /cpukit/zlib/compress.c | |
parent | This commit was generated by cvs2svn to compensate for changes in r25189, (diff) | |
download | rtems-6121dc77366dbc5b7fe28e6d405e498e79630c15.tar.bz2 |
2010-03-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* ChangeLog.zlib, FAQ, Makefile.am, README, adler32.c, compress.c,
crc32.c, deflate.c, deflate.h, infback.c, inffast.c, inflate.c,
inflate.h, inftrees.c, inftrees.h, trees.c, uncompr.c, zconf.h,
zlib.3, zlib.h, zutil.c, zutil.h: Update to zlib 1.2.4.
* gzclose.c, gzguts.h, gzlib.c, gzread.c, gzwrite.c, doc/algorithm.txt:
New files.
* algorithm.txt, gzio.c: Removed.
Diffstat (limited to 'cpukit/zlib/compress.c')
-rw-r--r-- | cpukit/zlib/compress.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/cpukit/zlib/compress.c b/cpukit/zlib/compress.c index 30970afad3..ea4dfbe9d7 100644 --- a/cpukit/zlib/compress.c +++ b/cpukit/zlib/compress.c @@ -1,5 +1,5 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2005 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -19,12 +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; @@ -59,11 +59,11 @@ int ZEXPORT compress2 ( /* =========================================================================== */ -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); } @@ -72,8 +72,9 @@ int ZEXPORT compress ( If the default memLevel or windowBits for deflateInit() is changed, then this function needs to be updated. */ -uLong ZEXPORT compressBound ( - uLong sourceLen) +uLong ZEXPORT compressBound (sourceLen) + uLong sourceLen; { - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13; } |