X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Fu-boot%2Fzlib.h;h=e23ceb50ca038c835ce7f02c213c304b0c266a90;hb=132f9bfc9ed0761fe349d2609918fa8a61e20692;hp=a817e4cd1406697fd3688a240e6a2138ca56ecf9;hpb=28958b8bea4c66629c5a22fd3c8b0d49df90383d;p=u-boot diff --git a/include/u-boot/zlib.h b/include/u-boot/zlib.h index a817e4cd14..e23ceb50ca 100644 --- a/include/u-boot/zlib.h +++ b/include/u-boot/zlib.h @@ -200,7 +200,7 @@ extern "C" { #endif /* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) + (1 << (windowBits+2)) + (1 << (memLevel+9)) that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) plus a few kilobytes for small objects. For example, if you want to reduce the default memory requirements from 256K to 128K, compile with @@ -212,7 +212,7 @@ extern "C" { for small objects. */ - /* Type declarations */ + /* Type declarations */ #ifndef OF /* function prototypes */ # ifdef STDC @@ -461,7 +461,7 @@ typedef struct gz_header_s { typedef gz_header FAR *gz_headerp; - /* constants */ + /* constants */ #define Z_NO_FLUSH 0 #define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ #define Z_SYNC_FLUSH 2 @@ -505,19 +505,49 @@ typedef gz_header FAR *gz_headerp; #define Z_DEFLATED 8 /* The deflate compression method (the only one supported in this version) */ -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ +#define Z_NULL (void *)0 /* for initializing zalloc, zfree, opaque */ - /* basic functions */ + /* basic functions */ /* The application can compare zlibVersion and ZLIB_VERSION for consistency. If the first character differs, the library code actually used is not compatible with the zlib.h header file used by the application. This check is automatically made by deflateInit and inflateInit. - */ - -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, const char *version, - int stream_size)); - + */ + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, + gz_headerp head)); +ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, + int bits, + int value)); +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain)); +ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, + uLong sourceLen)); +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); + + +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); /* inflate decompresses as much data as possible, and stops when the input @@ -627,11 +657,11 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); static string (which must not be deallocated). */ - /* Advanced functions */ + /* Advanced functions */ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); - /* utility functions */ + /* utility functions */ /* The following utility functions are implemented on top of the @@ -681,7 +711,7 @@ ZEXTERN uInt ZEXPORT crc32 OF((uInt crc, const Bytef *buf, uInt len)); */ ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); + const char *version, int stream_size)); #define inflateInit(strm) \ inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) #define inflateInit2(strm, windowBits) \ @@ -691,6 +721,9 @@ ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, struct internal_state {int dummy;}; /* hack for buggy compilers */ #endif +extern void *gzalloc(void *, unsigned, unsigned); +extern void gzfree(void *, void *, unsigned); + #ifdef __cplusplus } #endif