zlib.c (92749) | zlib.c (93013) |
---|---|
1/* 2 * This file is derived from various .h and .c files from the zlib-1.0.4 3 * distribution by Jean-loup Gailly and Mark Adler, with some additions 4 * by Paul Mackerras to aid in implementing Deflate compression and 5 * decompression for PPP packets. See zlib.h for conditions of 6 * distribution and use. 7 * 8 * Changes that have been made include: 9 * - added Z_PACKET_FLUSH (see zlib.h for details) 10 * - added inflateIncomp and deflateOutputPending 11 * - allow strm->next_out to be NULL, meaning discard the output 12 * | 1/* 2 * This file is derived from various .h and .c files from the zlib-1.0.4 3 * distribution by Jean-loup Gailly and Mark Adler, with some additions 4 * by Paul Mackerras to aid in implementing Deflate compression and 5 * decompression for PPP packets. See zlib.h for conditions of 6 * distribution and use. 7 * 8 * Changes that have been made include: 9 * - added Z_PACKET_FLUSH (see zlib.h for details) 10 * - added inflateIncomp and deflateOutputPending 11 * - allow strm->next_out to be NULL, meaning discard the output 12 * |
13 * $FreeBSD: head/sys/net/zlib.c 92749 2002-03-20 04:05:26Z dillon $ | 13 * $FreeBSD: head/sys/net/zlib.c 93013 2002-03-23 13:05:53Z jedgar $ |
14 */ 15 16/* 17 * ==FILEVERSION 971210== 18 * 19 * This marker is used by the Linux installation script to determine 20 * whether an up-to-date version of this file is already installed. 21 */ --- 749 unchanged lines hidden (view full) --- 771 772 if (level == Z_DEFAULT_COMPRESSION) level = 6; 773 774 if (windowBits < 0) { /* undocumented feature: suppress zlib header */ 775 noheader = 1; 776 windowBits = -windowBits; 777 } 778 if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || | 14 */ 15 16/* 17 * ==FILEVERSION 971210== 18 * 19 * This marker is used by the Linux installation script to determine 20 * whether an up-to-date version of this file is already installed. 21 */ --- 749 unchanged lines hidden (view full) --- 771 772 if (level == Z_DEFAULT_COMPRESSION) level = 6; 773 774 if (windowBits < 0) { /* undocumented feature: suppress zlib header */ 775 noheader = 1; 776 windowBits = -windowBits; 777 } 778 if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || |
779 windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || | 779 windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || |
780 strategy < 0 || strategy > Z_HUFFMAN_ONLY) { 781 return Z_STREAM_ERROR; 782 } 783 s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); 784 if (s == Z_NULL) return Z_MEM_ERROR; 785 strm->state = (struct internal_state FAR *)s; 786 s->strm = strm; 787 --- 4599 unchanged lines hidden --- | 780 strategy < 0 || strategy > Z_HUFFMAN_ONLY) { 781 return Z_STREAM_ERROR; 782 } 783 s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); 784 if (s == Z_NULL) return Z_MEM_ERROR; 785 strm->state = (struct internal_state FAR *)s; 786 s->strm = strm; 787 --- 4599 unchanged lines hidden --- |