diff options
Diffstat (limited to 'compress.c')
-rw-r--r-- | compress.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995 Jean-loup Gailly. + * Copyright (C) 1995-1996 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -22,13 +22,13 @@ int compress (dest, destLen, source, sourceLen) Bytef *dest; uLongf *destLen; - Bytef *source; + const Bytef *source; uLong sourceLen; { z_stream stream; int err; - stream.next_in = source; + stream.next_in = (Bytef*)source; stream.avail_in = (uInt)sourceLen; /* Check for source > 64K on 16-bit machine: */ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; @@ -39,6 +39,7 @@ int compress (dest, destLen, source, sourceLen) stream.zalloc = (alloc_func)0; stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; err = deflateInit(&stream, Z_DEFAULT_COMPRESSION); if (err != Z_OK) return err; |