summaryrefslogtreecommitdiff
path: root/zlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'zlib.h')
-rw-r--r--zlib.h149
1 files changed, 77 insertions, 72 deletions
diff --git a/zlib.h b/zlib.h
index 787b5fd..49f56b4 100644
--- a/zlib.h
+++ b/zlib.h
@@ -1,5 +1,5 @@
1/* zlib.h -- interface of the 'zlib' general purpose compression library 1/* zlib.h -- interface of the 'zlib' general purpose compression library
2 version 1.1.2, March 19th, 1998 2 version 1.1.3, July 9th, 1998
3 3
4 Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler 4 Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
5 5
@@ -37,7 +37,7 @@
37extern "C" { 37extern "C" {
38#endif 38#endif
39 39
40#define ZLIB_VERSION "1.1.2" 40#define ZLIB_VERSION "1.1.3"
41 41
42/* 42/*
43 The 'zlib' compression library provides in-memory compression and 43 The 'zlib' compression library provides in-memory compression and
@@ -168,7 +168,7 @@ typedef z_stream FAR *z_streamp;
168 168
169 /* basic functions */ 169 /* basic functions */
170 170
171extern const char * ZEXPORT zlibVersion OF((void)); 171ZEXTERN const char * ZEXPORT zlibVersion OF((void));
172/* The application can compare zlibVersion and ZLIB_VERSION for consistency. 172/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
173 If the first character differs, the library code actually used is 173 If the first character differs, the library code actually used is
174 not compatible with the zlib.h header file used by the application. 174 not compatible with the zlib.h header file used by the application.
@@ -176,7 +176,7 @@ extern const char * ZEXPORT zlibVersion OF((void));
176 */ 176 */
177 177
178/* 178/*
179extern int ZEXPORT deflateInit OF((z_streamp strm, int level)); 179ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
180 180
181 Initializes the internal stream state for compression. The fields 181 Initializes the internal stream state for compression. The fields
182 zalloc, zfree and opaque must be initialized before by the caller. 182 zalloc, zfree and opaque must be initialized before by the caller.
@@ -198,7 +198,7 @@ extern int ZEXPORT deflateInit OF((z_streamp strm, int level));
198*/ 198*/
199 199
200 200
201extern int ZEXPORT deflate OF((z_streamp strm, int flush)); 201ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
202/* 202/*
203 deflate compresses as much data as possible, and stops when the input 203 deflate compresses as much data as possible, and stops when the input
204 buffer becomes empty or the output buffer becomes full. It may introduce some 204 buffer becomes empty or the output buffer becomes full. It may introduce some
@@ -271,11 +271,12 @@ extern int ZEXPORT deflate OF((z_streamp strm, int flush));
271 processed or more output produced), Z_STREAM_END if all input has been 271 processed or more output produced), Z_STREAM_END if all input has been
272 consumed and all output has been produced (only when flush is set to 272 consumed and all output has been produced (only when flush is set to
273 Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example 273 Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
274 if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible. 274 if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
275 (for example avail_in or avail_out was zero).
275*/ 276*/
276 277
277 278
278extern int ZEXPORT deflateEnd OF((z_streamp strm)); 279ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
279/* 280/*
280 All dynamically allocated data structures for this stream are freed. 281 All dynamically allocated data structures for this stream are freed.
281 This function discards any unprocessed input and does not flush any 282 This function discards any unprocessed input and does not flush any
@@ -290,7 +291,7 @@ extern int ZEXPORT deflateEnd OF((z_streamp strm));
290 291
291 292
292/* 293/*
293extern int ZEXPORT inflateInit OF((z_streamp strm)); 294ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
294 295
295 Initializes the internal stream state for decompression. The fields 296 Initializes the internal stream state for decompression. The fields
296 next_in, avail_in, zalloc, zfree and opaque must be initialized before by 297 next_in, avail_in, zalloc, zfree and opaque must be initialized before by
@@ -310,7 +311,7 @@ extern int ZEXPORT inflateInit OF((z_streamp strm));
310*/ 311*/
311 312
312 313
313extern int ZEXPORT inflate OF((z_streamp strm, int flush)); 314ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
314/* 315/*
315 inflate decompresses as much data as possible, and stops when the input 316 inflate decompresses as much data as possible, and stops when the input
316 buffer becomes empty or the output buffer becomes full. It may some 317 buffer becomes empty or the output buffer becomes full. It may some
@@ -379,7 +380,7 @@ extern int ZEXPORT inflate OF((z_streamp strm, int flush));
379*/ 380*/
380 381
381 382
382extern int ZEXPORT inflateEnd OF((z_streamp strm)); 383ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
383/* 384/*
384 All dynamically allocated data structures for this stream are freed. 385 All dynamically allocated data structures for this stream are freed.
385 This function discards any unprocessed input and does not flush any 386 This function discards any unprocessed input and does not flush any
@@ -397,12 +398,12 @@ extern int ZEXPORT inflateEnd OF((z_streamp strm));
397*/ 398*/
398 399
399/* 400/*
400extern int ZEXPORT deflateInit2 OF((z_streamp strm, 401ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
401 int level, 402 int level,
402 int method, 403 int method,
403 int windowBits, 404 int windowBits,
404 int memLevel, 405 int memLevel,
405 int strategy)); 406 int strategy));
406 407
407 This is another version of deflateInit with more compression options. The 408 This is another version of deflateInit with more compression options. The
408 fields next_in, zalloc, zfree and opaque must be initialized before by 409 fields next_in, zalloc, zfree and opaque must be initialized before by
@@ -440,14 +441,14 @@ extern int ZEXPORT deflateInit2 OF((z_streamp strm,
440 not perform any compression: this will be done by deflate(). 441 not perform any compression: this will be done by deflate().
441*/ 442*/
442 443
443extern int ZEXPORT deflateSetDictionary OF((z_streamp strm, 444ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
444 const Bytef *dictionary, 445 const Bytef *dictionary,
445 uInt dictLength)); 446 uInt dictLength));
446/* 447/*
447 Initializes the compression dictionary from the given byte sequence 448 Initializes the compression dictionary from the given byte sequence
448 without producing any compressed output. This function must be called 449 without producing any compressed output. This function must be called
449 immediately after deflateInit or deflateInit2, before any call of 450 immediately after deflateInit, deflateInit2 or deflateReset, before any
450 deflate. The compressor and decompressor must use exactly the same 451 call of deflate. The compressor and decompressor must use exactly the same
451 dictionary (see inflateSetDictionary). 452 dictionary (see inflateSetDictionary).
452 453
453 The dictionary should consist of strings (byte sequences) that are likely 454 The dictionary should consist of strings (byte sequences) that are likely
@@ -476,8 +477,8 @@ extern int ZEXPORT deflateSetDictionary OF((z_streamp strm,
476 perform any compression: this will be done by deflate(). 477 perform any compression: this will be done by deflate().
477*/ 478*/
478 479
479extern int ZEXPORT deflateCopy OF((z_streamp dest, 480ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
480 z_streamp source)); 481 z_streamp source));
481/* 482/*
482 Sets the destination stream as a complete copy of the source stream. 483 Sets the destination stream as a complete copy of the source stream.
483 484
@@ -494,7 +495,7 @@ extern int ZEXPORT deflateCopy OF((z_streamp dest,
494 destination. 495 destination.
495*/ 496*/
496 497
497extern int ZEXPORT deflateReset OF((z_streamp strm)); 498ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
498/* 499/*
499 This function is equivalent to deflateEnd followed by deflateInit, 500 This function is equivalent to deflateEnd followed by deflateInit,
500 but does not free and reallocate all the internal compression state. 501 but does not free and reallocate all the internal compression state.
@@ -505,7 +506,9 @@ extern int ZEXPORT deflateReset OF((z_streamp strm));
505 stream state was inconsistent (such as zalloc or state being NULL). 506 stream state was inconsistent (such as zalloc or state being NULL).
506*/ 507*/
507 508
508extern int ZEXPORT deflateParams OF((z_streamp strm, int level, int strategy)); 509ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
510 int level,
511 int strategy));
509/* 512/*
510 Dynamically update the compression level and compression strategy. The 513 Dynamically update the compression level and compression strategy. The
511 interpretation of level and strategy is as in deflateInit2. This can be 514 interpretation of level and strategy is as in deflateInit2. This can be
@@ -525,8 +528,8 @@ extern int ZEXPORT deflateParams OF((z_streamp strm, int level, int strategy));
525*/ 528*/
526 529
527/* 530/*
528extern int ZEXPORT inflateInit2 OF((z_streamp strm, 531ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
529 int windowBits)); 532 int windowBits));
530 533
531 This is another version of inflateInit with an extra parameter. The 534 This is another version of inflateInit with an extra parameter. The
532 fields next_in, avail_in, zalloc, zfree and opaque must be initialized 535 fields next_in, avail_in, zalloc, zfree and opaque must be initialized
@@ -547,9 +550,9 @@ extern int ZEXPORT inflateInit2 OF((z_streamp strm,
547 modified, but next_out and avail_out are unchanged.) 550 modified, but next_out and avail_out are unchanged.)
548*/ 551*/
549 552
550extern int ZEXPORT inflateSetDictionary OF((z_streamp strm, 553ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
551 const Bytef *dictionary, 554 const Bytef *dictionary,
552 uInt dictLength)); 555 uInt dictLength));
553/* 556/*
554 Initializes the decompression dictionary from the given uncompressed byte 557 Initializes the decompression dictionary from the given uncompressed byte
555 sequence. This function must be called immediately after a call of inflate 558 sequence. This function must be called immediately after a call of inflate
@@ -566,7 +569,7 @@ extern int ZEXPORT inflateSetDictionary OF((z_streamp strm,
566 inflate(). 569 inflate().
567*/ 570*/
568 571
569extern int ZEXPORT inflateSync OF((z_streamp strm)); 572ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
570/* 573/*
571 Skips invalid compressed data until a full flush point (see above the 574 Skips invalid compressed data until a full flush point (see above the
572 description of deflate with Z_FULL_FLUSH) can be found, or until all 575 description of deflate with Z_FULL_FLUSH) can be found, or until all
@@ -581,7 +584,7 @@ extern int ZEXPORT inflateSync OF((z_streamp strm));
581 until success or end of the input data. 584 until success or end of the input data.
582*/ 585*/
583 586
584extern int ZEXPORT inflateReset OF((z_streamp strm)); 587ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
585/* 588/*
586 This function is equivalent to inflateEnd followed by inflateInit, 589 This function is equivalent to inflateEnd followed by inflateInit,
587 but does not free and reallocate all the internal decompression state. 590 but does not free and reallocate all the internal decompression state.
@@ -602,8 +605,8 @@ extern int ZEXPORT inflateReset OF((z_streamp strm));
602 utility functions can easily be modified if you need special options. 605 utility functions can easily be modified if you need special options.
603*/ 606*/
604 607
605extern int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, 608ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
606 const Bytef *source, uLong sourceLen)); 609 const Bytef *source, uLong sourceLen));
607/* 610/*
608 Compresses the source buffer into the destination buffer. sourceLen is 611 Compresses the source buffer into the destination buffer. sourceLen is
609 the byte length of the source buffer. Upon entry, destLen is the total 612 the byte length of the source buffer. Upon entry, destLen is the total
@@ -617,9 +620,9 @@ extern int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
617 buffer. 620 buffer.
618*/ 621*/
619 622
620extern int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, 623ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
621 const Bytef *source, uLong sourceLen, 624 const Bytef *source, uLong sourceLen,
622 int level)); 625 int level));
623/* 626/*
624 Compresses the source buffer into the destination buffer. The level 627 Compresses the source buffer into the destination buffer. The level
625 parameter has the same meaning as in deflateInit. sourceLen is the byte 628 parameter has the same meaning as in deflateInit. sourceLen is the byte
@@ -632,8 +635,8 @@ extern int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
632 Z_STREAM_ERROR if the level parameter is invalid. 635 Z_STREAM_ERROR if the level parameter is invalid.
633*/ 636*/
634 637
635extern int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, 638ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
636 const Bytef *source, uLong sourceLen)); 639 const Bytef *source, uLong sourceLen));
637/* 640/*
638 Decompresses the source buffer into the destination buffer. sourceLen is 641 Decompresses the source buffer into the destination buffer. sourceLen is
639 the byte length of the source buffer. Upon entry, destLen is the total 642 the byte length of the source buffer. Upon entry, destLen is the total
@@ -653,7 +656,7 @@ extern int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
653 656
654typedef voidp gzFile; 657typedef voidp gzFile;
655 658
656extern gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); 659ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
657/* 660/*
658 Opens a gzip (.gz) file for reading or writing. The mode parameter 661 Opens a gzip (.gz) file for reading or writing. The mode parameter
659 is as in fopen ("rb" or "wb") but can also include a compression level 662 is as in fopen ("rb" or "wb") but can also include a compression level
@@ -669,7 +672,7 @@ extern gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
669 can be checked to distinguish the two cases (if errno is zero, the 672 can be checked to distinguish the two cases (if errno is zero, the
670 zlib error is Z_MEM_ERROR). */ 673 zlib error is Z_MEM_ERROR). */
671 674
672extern gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); 675ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
673/* 676/*
674 gzdopen() associates a gzFile with the file descriptor fd. File 677 gzdopen() associates a gzFile with the file descriptor fd. File
675 descriptors are obtained from calls like open, dup, creat, pipe or 678 descriptors are obtained from calls like open, dup, creat, pipe or
@@ -682,7 +685,7 @@ extern gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
682 the (de)compression state. 685 the (de)compression state.
683*/ 686*/
684 687
685extern int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); 688ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
686/* 689/*
687 Dynamically update the compression level or strategy. See the description 690 Dynamically update the compression level or strategy. See the description
688 of deflateInit2 for the meaning of these parameters. 691 of deflateInit2 for the meaning of these parameters.
@@ -690,7 +693,7 @@ extern int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
690 opened for writing. 693 opened for writing.
691*/ 694*/
692 695
693extern int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); 696ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
694/* 697/*
695 Reads the given number of uncompressed bytes from the compressed file. 698 Reads the given number of uncompressed bytes from the compressed file.
696 If the input file was not in gzip format, gzread copies the given number 699 If the input file was not in gzip format, gzread copies the given number
@@ -698,28 +701,29 @@ extern int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
698 gzread returns the number of uncompressed bytes actually read (0 for 701 gzread returns the number of uncompressed bytes actually read (0 for
699 end of file, -1 for error). */ 702 end of file, -1 for error). */
700 703
701extern int ZEXPORT gzwrite OF((gzFile file, const voidp buf, unsigned len)); 704ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
705 const voidp buf, unsigned len));
702/* 706/*
703 Writes the given number of uncompressed bytes into the compressed file. 707 Writes the given number of uncompressed bytes into the compressed file.
704 gzwrite returns the number of uncompressed bytes actually written 708 gzwrite returns the number of uncompressed bytes actually written
705 (0 in case of error). 709 (0 in case of error).
706*/ 710*/
707 711
708extern int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); 712ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
709/* 713/*
710 Converts, formats, and writes the args to the compressed file under 714 Converts, formats, and writes the args to the compressed file under
711 control of the format string, as in fprintf. gzprintf returns the number of 715 control of the format string, as in fprintf. gzprintf returns the number of
712 uncompressed bytes actually written (0 in case of error). 716 uncompressed bytes actually written (0 in case of error).
713*/ 717*/
714 718
715extern int ZEXPORT gzputs OF((gzFile file, const char *s)); 719ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
716/* 720/*
717 Writes the given null-terminated string to the compressed file, excluding 721 Writes the given null-terminated string to the compressed file, excluding
718 the terminating null character. 722 the terminating null character.
719 gzputs returns the number of characters written, or -1 in case of error. 723 gzputs returns the number of characters written, or -1 in case of error.
720*/ 724*/
721 725
722extern char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); 726ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
723/* 727/*
724 Reads bytes from the compressed file until len-1 characters are read, or 728 Reads bytes from the compressed file until len-1 characters are read, or
725 a newline character is read and transferred to buf, or an end-of-file 729 a newline character is read and transferred to buf, or an end-of-file
@@ -728,19 +732,19 @@ extern char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
728 gzgets returns buf, or Z_NULL in case of error. 732 gzgets returns buf, or Z_NULL in case of error.
729*/ 733*/
730 734
731extern int ZEXPORT gzputc OF((gzFile file, int c)); 735ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
732/* 736/*
733 Writes c, converted to an unsigned char, into the compressed file. 737 Writes c, converted to an unsigned char, into the compressed file.
734 gzputc returns the value that was written, or -1 in case of error. 738 gzputc returns the value that was written, or -1 in case of error.
735*/ 739*/
736 740
737extern int ZEXPORT gzgetc OF((gzFile file)); 741ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
738/* 742/*
739 Reads one byte from the compressed file. gzgetc returns this byte 743 Reads one byte from the compressed file. gzgetc returns this byte
740 or -1 in case of end of file or error. 744 or -1 in case of end of file or error.
741*/ 745*/
742 746
743extern int ZEXPORT gzflush OF((gzFile file, int flush)); 747ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
744/* 748/*
745 Flushes all pending output into the compressed file. The parameter 749 Flushes all pending output into the compressed file. The parameter
746 flush is as in the deflate() function. The return value is the zlib 750 flush is as in the deflate() function. The return value is the zlib
@@ -750,10 +754,11 @@ extern int ZEXPORT gzflush OF((gzFile file, int flush));
750 degrade compression. 754 degrade compression.
751*/ 755*/
752 756
753extern z_off_t ZEXPORT gzseek OF((gzFile file, z_off_t offset, int whence)); 757ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
758 z_off_t offset, int whence));
754/* 759/*
755 Sets the starting position for the next gzread or gzwrite on the given 760 Sets the starting position for the next gzread or gzwrite on the
756 compressed file. The offset represents a number of bytes in the 761 given compressed file. The offset represents a number of bytes in the
757 uncompressed data stream. The whence parameter is defined as in lseek(2); 762 uncompressed data stream. The whence parameter is defined as in lseek(2);
758 the value SEEK_END is not supported. 763 the value SEEK_END is not supported.
759 If the file is opened for reading, this function is emulated but can be 764 If the file is opened for reading, this function is emulated but can be
@@ -767,14 +772,14 @@ extern z_off_t ZEXPORT gzseek OF((gzFile file, z_off_t offset, int whence));
767 would be before the current position. 772 would be before the current position.
768*/ 773*/
769 774
770extern int ZEXPORT gzrewind OF((gzFile file)); 775ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
771/* 776/*
772 Rewinds the given file. This function is supported only for reading. 777 Rewinds the given file. This function is supported only for reading.
773 778
774 gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) 779 gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
775*/ 780*/
776 781
777extern z_off_t ZEXPORT gztell OF((gzFile file)); 782ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
778/* 783/*
779 Returns the starting position for the next gzread or gzwrite on the 784 Returns the starting position for the next gzread or gzwrite on the
780 given compressed file. This position represents a number of bytes in the 785 given compressed file. This position represents a number of bytes in the
@@ -783,20 +788,20 @@ extern z_off_t ZEXPORT gztell OF((gzFile file));
783 gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) 788 gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
784*/ 789*/
785 790
786extern int ZEXPORT gzeof OF((gzFile file)); 791ZEXTERN int ZEXPORT gzeof OF((gzFile file));
787/* 792/*
788 Returns 1 when EOF has previously been detected reading the given 793 Returns 1 when EOF has previously been detected reading the given
789 input stream, otherwise zero. 794 input stream, otherwise zero.
790*/ 795*/
791 796
792extern int ZEXPORT gzclose OF((gzFile file)); 797ZEXTERN int ZEXPORT gzclose OF((gzFile file));
793/* 798/*
794 Flushes all pending output if necessary, closes the compressed file 799 Flushes all pending output if necessary, closes the compressed file
795 and deallocates all the (de)compression state. The return value is the zlib 800 and deallocates all the (de)compression state. The return value is the zlib
796 error number (see function gzerror below). 801 error number (see function gzerror below).
797*/ 802*/
798 803
799extern const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); 804ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
800/* 805/*
801 Returns the error message for the last error which occurred on the 806 Returns the error message for the last error which occurred on the
802 given compressed file. errnum is set to zlib error number. If an 807 given compressed file. errnum is set to zlib error number. If an
@@ -813,7 +818,7 @@ extern const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
813 compression library. 818 compression library.
814*/ 819*/
815 820
816extern uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); 821ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
817 822
818/* 823/*
819 Update a running Adler-32 checksum with the bytes buf[0..len-1] and 824 Update a running Adler-32 checksum with the bytes buf[0..len-1] and
@@ -830,7 +835,7 @@ extern uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
830 if (adler != original_adler) error(); 835 if (adler != original_adler) error();
831*/ 836*/
832 837
833extern uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); 838ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
834/* 839/*
835 Update a running crc with the bytes buf[0..len-1] and return the updated 840 Update a running crc with the bytes buf[0..len-1] and return the updated
836 crc. If buf is NULL, this function returns the required initial value 841 crc. If buf is NULL, this function returns the required initial value
@@ -852,16 +857,16 @@ extern uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
852/* deflateInit and inflateInit are macros to allow checking the zlib version 857/* deflateInit and inflateInit are macros to allow checking the zlib version
853 * and the compiler's view of z_stream: 858 * and the compiler's view of z_stream:
854 */ 859 */
855extern int ZEXPORT deflateInit_ OF((z_streamp strm, int level, 860ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
856 const char *version, int stream_size));
857extern int ZEXPORT inflateInit_ OF((z_streamp strm,
858 const char *version, int stream_size));
859extern int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
860 int windowBits, int memLevel,
861 int strategy, const char *version,
862 int stream_size));
863extern int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
864 const char *version, int stream_size)); 861 const char *version, int stream_size));
862ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
863 const char *version, int stream_size));
864ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
865 int windowBits, int memLevel,
866 int strategy, const char *version,
867 int stream_size));
868ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
869 const char *version, int stream_size));
865#define deflateInit(strm, level) \ 870#define deflateInit(strm, level) \
866 deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) 871 deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
867#define inflateInit(strm) \ 872#define inflateInit(strm) \
@@ -877,9 +882,9 @@ extern int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
877 struct internal_state {int dummy;}; /* hack for buggy compilers */ 882 struct internal_state {int dummy;}; /* hack for buggy compilers */
878#endif 883#endif
879 884
880extern const char * ZEXPORT zError OF((int err)); 885ZEXTERN const char * ZEXPORT zError OF((int err));
881extern int ZEXPORT inflateSyncPoint OF((z_streamp z)); 886ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
882extern const uLongf * ZEXPORT get_crc_table OF((void)); 887ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
883 888
884#ifdef __cplusplus 889#ifdef __cplusplus
885} 890}