1 typedef void * (*alloc_func
)(void * opaque
, unsigned items
, unsigned size
);
2 typedef void (*free_func
)(void * opaque
, void * address
);
4 typedef struct z_stream_s
{
11 void * zcalloc(void * opaque
, unsigned items
, unsigned size
);
12 void zcfree(void * opaque
, void * ptr
);
14 int deflateInit2_(z_stream
*strm
, int level
, int method
, int windowBits
,
15 int memLevel
, int strategy
, const char *version
,
18 static const char *my_version
= "1.1.3";
20 if (version
== 0 || version
[0] != my_version
[0] ||
21 stream_size
!= sizeof(z_stream
)) {
28 if (strm
->zalloc
== 0) {
29 strm
->zalloc
= zcalloc
;
30 strm
->opaque
= (void *)0;
40 windowBits
= -windowBits
;
42 if (memLevel
< 1 || memLevel
> 9 || method
!= 8 || windowBits
< 8 ||
43 windowBits
> 15 || level
< 0 || level
> 9 || strategy
< 0 ||
47 (*((strm
)->zalloc
))((strm
)->opaque
, (1), 112);