components/zlib/llib-lz
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 184 037c654f48d9
child 1945 3dc1935a2189
child 3670 fe32d4cd3c6b
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
184
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     1
/*
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     2
 * CDDL HEADER START
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     3
 *
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     5
 * Common Development and Distribution License (the "License").
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     6
 * You may not use this file except in compliance with the License.
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     7
 *
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    11
 * and limitations under the License.
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    12
 *
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    18
 *
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    19
 * CDDL HEADER END
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    20
 */
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    21
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    22
/*
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    23
 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    24
 */
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    25
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    26
/* LINTLIBRARY */
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    27
/* PROTOLIB1 */
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    28
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    29
#include <stdlib.h>
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    30
#include <stdio.h>
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    31
#include <stdarg.h>
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    32
#include <zlib.h>
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    33
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    34
const char *zlibVersion(void);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    35
int deflateInit_(z_streamp strm, int level, const char *version,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    36
    int stream_size);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    37
int deflateInit2_(z_streamp strm, int  level, int  method, int windowBits,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    38
    int memLevel, int strategy, const char *version, int stream_size);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    39
int deflate(z_streamp strm, int flush);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    40
int deflateSetDictionary(z_streamp strm, const Bytef *dictionary,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    41
    uInt dictLength);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    42
int deflateCopy(z_streamp dest, z_streamp source);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    43
int deflateReset(z_streamp strm);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    44
int deflateParams(z_streamp strm, int level, int strategy);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    45
int deflateEnd(z_streamp strm);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    46
int deflateTune(z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    47
uLong deflateBound(z_streamp strm, uLong sourceLen);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    48
int deflatePrime(z_streamp strm, int bits, int value);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    49
int deflateSetHeader(z_streamp strm, gz_headerp head);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    50
int inflateCopy(z_streamp dest, z_streamp source);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    51
int inflatePrime(z_streamp strm, int bits, int value);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    52
int inflateGetHeader(z_streamp strm, gz_headerp head);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    53
int inflateBack(z_streamp strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    54
int inflateBackEnd(z_streamp strm);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    55
int inflateInit_(z_streamp strm, const char *version, int stream_size);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    56
int inflateInit2_(z_streamp strm, int  windowBits, const char *version,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    57
    int stream_size);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    58
int inflateBackInit_(z_streamp strm, int windowBits, unsigned char FAR *window,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    59
    const char *version, int stream_size);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    60
int inflate(z_streamp strm, int flush);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    61
int inflateSetDictionary(z_streamp strm, const Bytef *dictionary,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    62
    uInt dictLength);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    63
int inflateSync(z_streamp strm);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    64
int inflateReset(z_streamp strm);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    65
int inflateEnd(z_streamp strm);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    66
int compress(Bytef *dest, uLongf *destLen, const Bytef *source,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    67
    uLong sourceLen);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    68
int compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    69
    uLong sourceLen, int level);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    70
uLong compressBound(uLong sourceLen);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    71
int uncompress(Bytef *dest, uLongf *destLen, const Bytef *source,
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    72
    uLong sourceLen);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    73
gzFile gzopen(const char *path, const char *mode);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    74
gzFile gzdopen(int fd, const char *mode);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    75
int gzsetparams(gzFile file, int level, int strategy);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    76
int gzread(gzFile file, voidp buf, unsigned len);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    77
int gzwrite(gzFile file, voidpc buf, unsigned len);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    78
int gzprintf(gzFile file, const char *format, ...);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    79
int gzputs(gzFile file, const char *s);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    80
char *gzgets(gzFile file, char *buf, int len);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    81
int gzungetc(int c, gzFile file);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    82
int gzputc(gzFile file, int c);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    83
int gzgetc(gzFile file);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    84
int gzflush(gzFile file, int flush);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    85
z_off_t gzseek(gzFile file, z_off_t offset, int whence);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    86
int gzrewind(gzFile file);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    87
z_off_t gztell(gzFile file);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    88
int gzeof(gzFile file);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    89
int gzclose(gzFile file);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    90
int gzdirect(gzFile file);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    91
void gzclearerr(gzFile file);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    92
const char *gzerror(gzFile file, int *errnum);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    93
uLong adler32(uLong adler, const Bytef *buf, uInt len);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    94
uLong adler32_combine(uLong adler1, uLong adler2, z_off_t len2);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    95
uLong crc32(uLong crc, const Bytef *buf, uInt len);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    96
uLong crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    97
const char *zError(int err);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    98
uLong zlibCompileFlags(void);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    99
int inflateSyncPoint(z_streamp z);
037c654f48d9 7036217 move zlib to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
   100
const uLongf *get_crc_table(void);