The R Project SVN R

Rev

Rev 59344 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59344 Rev 62873
Line 1... Line 1...
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.2.7, May 2nd, 2012
2
  version 1.2.8, April 28th, 2013
3
 
3
 
4
  Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler
4
  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
5
 
5
 
6
  This software is provided 'as-is', without any express or implied
6
  This software is provided 'as-is', without any express or implied
7
  warranty.  In no event will the authors be held liable for any damages
7
  warranty.  In no event will the authors be held liable for any damages
8
  arising from the use of this software.
8
  arising from the use of this software.
9
 
9
 
Line 35... Line 35...
35
 
35
 
36
#ifdef __cplusplus
36
#ifdef __cplusplus
37
extern "C" {
37
extern "C" {
38
#endif
38
#endif
39
 
39
 
40
#define ZLIB_VERSION "1.2.7"
40
#define ZLIB_VERSION "1.2.8"
41
#define ZLIB_VERNUM 0x1270
41
#define ZLIB_VERNUM 0x1280
42
#define ZLIB_VER_MAJOR 1
42
#define ZLIB_VER_MAJOR 1
43
#define ZLIB_VER_MINOR 2
43
#define ZLIB_VER_MINOR 2
44
#define ZLIB_VER_REVISION 7
44
#define ZLIB_VER_REVISION 8
45
#define ZLIB_VER_SUBREVISION 0
45
#define ZLIB_VER_SUBREVISION 0
46
 
46
 
47
/*
47
/*
48
    The 'zlib' compression library provides in-memory compression and
48
    The 'zlib' compression library provides in-memory compression and
49
  decompression functions, including integrity checks of the uncompressed data.
49
  decompression functions, including integrity checks of the uncompressed data.
Line 837... Line 837...
837
   expected one (incorrect adler32 value).  inflateSetDictionary does not
837
   expected one (incorrect adler32 value).  inflateSetDictionary does not
838
   perform any decompression: this will be done by subsequent calls of
838
   perform any decompression: this will be done by subsequent calls of
839
   inflate().
839
   inflate().
840
*/
840
*/
841
 
841
 
-
 
842
ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
-
 
843
                                             Bytef *dictionary,
-
 
844
                                             uInt  *dictLength));
-
 
845
/*
-
 
846
     Returns the sliding dictionary being maintained by inflate.  dictLength is
-
 
847
   set to the number of bytes in the dictionary, and that many bytes are copied
-
 
848
   to dictionary.  dictionary must have enough space, where 32768 bytes is
-
 
849
   always enough.  If inflateGetDictionary() is called with dictionary equal to
-
 
850
   Z_NULL, then only the dictionary length is returned, and nothing is copied.
-
 
851
   Similary, if dictLength is Z_NULL, then it is not set.
-
 
852
 
-
 
853
     inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
-
 
854
   stream state is inconsistent.
-
 
855
*/
-
 
856
 
842
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
857
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
843
/*
858
/*
844
     Skips invalid compressed data until a possible full flush point (see above
859
     Skips invalid compressed data until a possible full flush point (see above
845
   for the description of deflate with Z_FULL_FLUSH) can be found, or until all
860
   for the description of deflate with Z_FULL_FLUSH) can be found, or until all
846
   available input is skipped.  No output is provided.
861
   available input is skipped.  No output is provided.
847
 
862
 
848
     inflateSync searches for a 00 00 FF FF pattern in the compressed data.
863
     inflateSync searches for a 00 00 FF FF pattern in the compressed data.
849
   All full flush points have this pattern, but not all occurences of this
864
   All full flush points have this pattern, but not all occurrences of this
850
   pattern are full flush points.
865
   pattern are full flush points.
851
 
866
 
852
     inflateSync returns Z_OK if a possible full flush point has been found,
867
     inflateSync returns Z_OK if a possible full flush point has been found,
853
   Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
868
   Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
854
   has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
869
   has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
Line 1005... Line 1020...
1005
   the parameters are invalid, Z_MEM_ERROR if the internal state could not be
1020
   the parameters are invalid, Z_MEM_ERROR if the internal state could not be
1006
   allocated, or Z_VERSION_ERROR if the version of the library does not match
1021
   allocated, or Z_VERSION_ERROR if the version of the library does not match
1007
   the version of the header file.
1022
   the version of the header file.
1008
*/
1023
*/
1009
 
1024
 
1010
typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
1025
typedef unsigned (*in_func) OF((void FAR *,
-
 
1026
                                z_const unsigned char FAR * FAR *));
1011
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
1027
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
1012
 
1028
 
1013
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
1029
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
1014
                                    in_func in, void FAR *in_desc,
1030
                                    in_func in, void FAR *in_desc,
1015
                                    out_func out, void FAR *out_desc));
1031
                                    out_func out, void FAR *out_desc));
1016
/*
1032
/*
1017
     inflateBack() does a raw inflate with a single call using a call-back
1033
     inflateBack() does a raw inflate with a single call using a call-back
1018
   interface for input and output.  This is more efficient than inflate() for
1034
   interface for input and output.  This is potentially more efficient than
1019
   file i/o applications in that it avoids copying between the output and the
1035
   inflate() for file i/o applications, in that it avoids copying between the
1020
   sliding window by simply making the window itself the output buffer.  This
1036
   output and the sliding window by simply making the window itself the output
-
 
1037
   buffer.  inflate() can be faster on modern CPUs when used with large
1021
   function trusts the application to not change the output buffer passed by
1038
   buffers.  inflateBack() trusts the application to not change the output
1022
   the output function, at least until inflateBack() returns.
1039
   buffer passed by the output function, at least until inflateBack() returns.
1023
 
1040
 
1024
     inflateBackInit() must be called first to allocate the internal state
1041
     inflateBackInit() must be called first to allocate the internal state
1025
   and to initialize the state with the user-provided window buffer.
1042
   and to initialize the state with the user-provided window buffer.
1026
   inflateBack() may then be used multiple times to inflate a complete, raw
1043
   inflateBack() may then be used multiple times to inflate a complete, raw
1027
   deflate stream with each call.  inflateBackEnd() is then called to free the
1044
   deflate stream with each call.  inflateBackEnd() is then called to free the
Line 1737... Line 1754...
1737
ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
1754
ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
1738
#if defined(_WIN32) && !defined(Z_SOLO)
1755
#if defined(_WIN32) && !defined(Z_SOLO)
1739
ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
1756
ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
1740
                                            const char *mode));
1757
                                            const char *mode));
1741
#endif
1758
#endif
-
 
1759
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
-
 
1760
#  ifndef Z_SOLO
-
 
1761
ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
-
 
1762
                                                  const char *format,
-
 
1763
                                                  va_list va));
-
 
1764
#  endif
-
 
1765
#endif
1742
 
1766
 
1743
#ifdef __cplusplus
1767
#ifdef __cplusplus
1744
}
1768
}
1745
#endif
1769
#endif
1746
 
1770