1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 24 */ 25 26 /* LINTLIBRARY */ 27 /* PROTOLIB1 */ 28 29 #include <stdlib.h> 30 #include <stdio.h> 31 #include <stdarg.h> 32 #include <zlib.h> 33 34 const char *zlibVersion(void); 35 int deflateInit_(z_streamp strm, int level, const char *version, 36 int stream_size); 37 int deflateInit2_(z_streamp strm, int level, int method, int windowBits, 38 int memLevel, int strategy, const char *version, int stream_size); 39 int deflate(z_streamp strm, int flush); 40 int deflateSetDictionary(z_streamp strm, const Bytef *dictionary, 41 uInt dictLength); 42 int deflateCopy(z_streamp dest, z_streamp source); 43 int deflateReset(z_streamp strm); 44 int deflateParams(z_streamp strm, int level, int strategy); 45 int deflateEnd(z_streamp strm); 46 int deflateTune(z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain); 47 uLong deflateBound(z_streamp strm, uLong sourceLen); 48 int deflatePending(z_streamp strm, unsigned *pending, int *bits); 49 int deflatePrime(z_streamp strm, int bits, int value); 50 int deflateSetHeader(z_streamp strm, gz_headerp head); 51 int inflateCopy(z_streamp dest, z_streamp source); 52 int inflatePrime(z_streamp strm, int bits, int value); 53 long inflateMark(z_streamp strm); 54 int inflateGetHeader(z_streamp strm, gz_headerp head); 55 int inflateBack(z_streamp strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc); 56 int inflateBackEnd(z_streamp strm); 57 int inflateInit_(z_streamp strm, const char *version, int stream_size); 58 int inflateInit2_(z_streamp strm, int windowBits, const char *version, 59 int stream_size); 60 int inflateBackInit_(z_streamp strm, int windowBits, unsigned char FAR *window, 61 const char *version, int stream_size); 62 int inflate(z_streamp strm, int flush); 63 int inflateSetDictionary(z_streamp strm, const Bytef *dictionary, 64 uInt dictLength); 65 int inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength); 66 int inflateSync(z_streamp strm); 67 int inflateReset(z_streamp strm); 68 int inflateReset2(z_streamp strm, int windowBits); 69 int inflateEnd(z_streamp strm); 70 int compress(Bytef *dest, uLongf *destLen, const Bytef *source, 71 uLong sourceLen); 72 int compress2(Bytef *dest, uLongf *destLen, const Bytef *source, 73 uLong sourceLen, int level); 74 uLong compressBound(uLong sourceLen); 75 int uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, 76 uLong sourceLen); 77 gzFile gzopen(const char *path, const char *mode); 78 gzFile gzopen64(const char *path, const char *mode); 79 gzFile gzdopen(int fd, const char *mode); 80 int gzbuffer(gzFile file, unsigned size); 81 int gzsetparams(gzFile file, int level, int strategy); 82 int gzread(gzFile file, voidp buf, unsigned len); 83 int gzwrite(gzFile file, voidpc buf, unsigned len); 84 int gzprintf(gzFile file, const char *format, ...); 85 int gzputs(gzFile file, const char *s); 86 char *gzgets(gzFile file, char *buf, int len); 87 int gzungetc(int c, gzFile file); 88 int gzputc(gzFile file, int c); 89 int gzflush(gzFile file, int flush); 90 z_off_t gzseek(gzFile file, z_off_t offset, int whence); 91 z_off64_t gzseek64(gzFile, z_off64_t, int); 92 int gzrewind(gzFile file); 93 z_off_t gztell(gzFile file); 94 z_off64_t gztell64(gzFile file); 95 z_off_t gzoffset(gzFile file); 96 z_off64_t gzoffset64(gzFile file); 97 int gzeof(gzFile file); 98 int gzclose(gzFile file); 99 int gzclose_r(gzFile file); 100 int gzclose_w(gzFile file); 101 int gzdirect(gzFile file); 102 void gzclearerr(gzFile file); 103 const char *gzerror(gzFile file, int *errnum); 104 uLong adler32(uLong adler, const Bytef *buf, uInt len); 105 uLong adler32_combine(uLong adler1, uLong adler2, z_off_t len2); 106 uLong adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2); 107 uLong crc32(uLong crc, const Bytef *buf, uInt len); 108 uLong crc32_combine(uLong crc1, uLong crc2, z_off_t len2); 109 uLong crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2); 110 const char *zError(int err); 111 uLong zlibCompileFlags(void); 112 int inflateSyncPoint(z_streamp z); 113 const z_crc_t *get_crc_table(void); 114 int inflateUndermine(z_streamp, int); 115 int inflateResetKeep(z_streamp); 116 int deflateResetKeep(z_streamp); 117 int gzvprintf(gzFile file, const char *format, va_list va);