summaryrefslogtreecommitdiffstats
path: root/src/misc/zlib/uncompr.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
commit6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch)
tree0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/misc/zlib/uncompr.c
parentf0e77f6797c0504b0da25a56152b707d3357f386 (diff)
downloadabc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip
initial commit of public abc
Diffstat (limited to 'src/misc/zlib/uncompr.c')
-rw-r--r--src/misc/zlib/uncompr.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/misc/zlib/uncompr.c b/src/misc/zlib/uncompr.c
index b59e3d0d..e195ec3e 100644
--- a/src/misc/zlib/uncompr.c
+++ b/src/misc/zlib/uncompr.c
@@ -1,13 +1,20 @@
/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * Copyright (C) 1995-2003, 2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "abc_global.h"
+
#define ZLIB_INTERNAL
#include "zlib.h"
+ABC_NAMESPACE_IMPL_START
+
/* ===========================================================================
Decompresses the source buffer into the destination buffer. sourceLen is
the byte length of the source buffer. Upon entry, destLen is the total
@@ -16,18 +23,12 @@
been saved previously by the compressor and transmitted to the decompressor
by some mechanism outside the scope of this compression library.)
Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted.
*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
+int ZEXPORT uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
{
z_stream stream;
int err;
@@ -59,3 +60,8 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen)
err = inflateEnd(&stream);
return err;
}
+
+
+
+ABC_NAMESPACE_IMPL_END
+