aboutsummaryrefslogtreecommitdiff
path: root/compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'compress.c')
-rw-r--r--compress.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/compress.c b/compress.c
index 2ad5326..f43bacf 100644
--- a/compress.c
+++ b/compress.c
@@ -19,13 +19,8 @@
19 memory, Z_BUF_ERROR if there was not enough room in the output buffer, 19 memory, Z_BUF_ERROR if there was not enough room in the output buffer,
20 Z_STREAM_ERROR if the level parameter is invalid. 20 Z_STREAM_ERROR if the level parameter is invalid.
21*/ 21*/
22int ZEXPORT compress2(dest, destLen, source, sourceLen, level) 22int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
23 Bytef *dest; 23 uLong sourceLen, int level) {
24 uLongf *destLen;
25 const Bytef *source;
26 uLong sourceLen;
27 int level;
28{
29 z_stream stream; 24 z_stream stream;
30 int err; 25 int err;
31 const uInt max = (uInt)-1; 26 const uInt max = (uInt)-1;
@@ -65,12 +60,8 @@ int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
65 60
66/* =========================================================================== 61/* ===========================================================================
67 */ 62 */
68int ZEXPORT compress(dest, destLen, source, sourceLen) 63int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
69 Bytef *dest; 64 uLong sourceLen) {
70 uLongf *destLen;
71 const Bytef *source;
72 uLong sourceLen;
73{
74 return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); 65 return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
75} 66}
76 67
@@ -78,9 +69,7 @@ int ZEXPORT compress(dest, destLen, source, sourceLen)
78 If the default memLevel or windowBits for deflateInit() is changed, then 69 If the default memLevel or windowBits for deflateInit() is changed, then
79 this function needs to be updated. 70 this function needs to be updated.
80 */ 71 */
81uLong ZEXPORT compressBound(sourceLen) 72uLong ZEXPORT compressBound(uLong sourceLen) {
82 uLong sourceLen;
83{
84 return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 73 return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
85 (sourceLen >> 25) + 13; 74 (sourceLen >> 25) + 13;
86} 75}