| [121] | 1 | /* uncompr.c -- decompress a memory buffer
|
|---|
| 2 | * Copyright (C) 1995-2003, 2010 Jean-loup Gailly.
|
|---|
| 3 | * For conditions of distribution and use, see copyright notice in zlib.h
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | /* @(#) $Id$ */
|
|---|
| 7 |
|
|---|
| 8 | #define ZLIB_INTERNAL
|
|---|
| 9 | #include "zlib.h"
|
|---|
| 10 |
|
|---|
| 11 | /* ===========================================================================
|
|---|
| 12 | Decompresses the source buffer into the destination buffer. sourceLen is
|
|---|
| 13 | the byte length of the source buffer. Upon entry, destLen is the total
|
|---|
| 14 | size of the destination buffer, which must be large enough to hold the
|
|---|
| 15 | entire uncompressed data. (The size of the uncompressed data must have
|
|---|
| 16 | been saved previously by the compressor and transmitted to the decompressor
|
|---|
| 17 | by some mechanism outside the scope of this compression library.)
|
|---|
| 18 | Upon exit, destLen is the actual size of the compressed buffer.
|
|---|
| 19 |
|
|---|
| 20 | uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
|
|---|
| 21 | enough memory, Z_BUF_ERROR if there was not enough room in the output
|
|---|
| 22 | buffer, or Z_DATA_ERROR if the input data was corrupted.
|
|---|
| 23 | */
|
|---|
| 24 | int ZEXPORT uncompress (dest, destLen, source, sourceLen)
|
|---|
| 25 | Bytef *dest;
|
|---|
| 26 | uLongf *destLen;
|
|---|
| 27 | const Bytef *source;
|
|---|
| 28 | uLong sourceLen;
|
|---|
| 29 | {
|
|---|
| 30 | z_stream stream;
|
|---|
| |
|---|