Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/zlib/compress.c

Issue 8806004: Update zlib to 1.2.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/zlib/adler32.c ('k') | third_party/zlib/contrib/minizip/crypt.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* compress.c -- compress a memory buffer 1 /* compress.c -- compress a memory buffer
2 * Copyright (C) 1995-2003 Jean-loup Gailly. 2 * Copyright (C) 1995-2005 Jean-loup Gailly.
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
6 /* @(#) $Id: compress.c,v 3.6 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */ 6 /* @(#) $Id$ */
7 7
8 #define ZLIB_INTERNAL 8 #define ZLIB_INTERNAL
9 #include "zlib.h" 9 #include "zlib.h"
10 10
11 /* =========================================================================== 11 /* ===========================================================================
12 Compresses the source buffer into the destination buffer. The level 12 Compresses the source buffer into the destination buffer. The level
13 parameter has the same meaning as in deflateInit. sourceLen is the byte 13 parameter has the same meaning as in deflateInit. sourceLen is the byte
14 length of the source buffer. Upon entry, destLen is the total size of the 14 length of the source buffer. Upon entry, destLen is the total size of the
15 destination buffer, which must be at least 0.1% larger than sourceLen plus 15 destination buffer, which must be at least 0.1% larger than sourceLen plus
16 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 16 12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); 68 return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
69 } 69 }
70 70
71 /* =========================================================================== 71 /* ===========================================================================
72 If the default memLevel or windowBits for deflateInit() is changed, then 72 If the default memLevel or windowBits for deflateInit() is changed, then
73 this function needs to be updated. 73 this function needs to be updated.
74 */ 74 */
75 uLong ZEXPORT compressBound (sourceLen) 75 uLong ZEXPORT compressBound (sourceLen)
76 uLong sourceLen; 76 uLong sourceLen;
77 { 77 {
78 return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; 78 return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
79 (sourceLen >> 25) + 13;
79 } 80 }
OLDNEW
« no previous file with comments | « third_party/zlib/adler32.c ('k') | third_party/zlib/contrib/minizip/crypt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698