100 void makefixed
OF((
void));
134 state->dmax = 32768U;
185 if (
windowBits && (windowBits < 8 || windowBits > 15))
285 static int virgin = 1;
296 while (sym < 144)
state->lens[sym++] = 8;
297 while (sym < 256)
state->lens[sym++] = 9;
298 while (sym < 280)
state->lens[sym++] = 7;
299 while (sym < 288)
state->lens[sym++] = 8;
307 while (sym < 32)
state->lens[sym++] = 5;
351 puts(
" /* inffixed.h -- table for decoding fixed codes");
352 puts(
" * Generated automatically by makefixed().");
355 puts(
" /* WARNING: this file should *not* be used by applications.");
356 puts(
" It is part of the implementation of this library and is");
357 puts(
" subject to change. Applications should only use zlib.h.");
361 printf(
" static const code lenfix[%u] = {",
size);
364 if ((low % 7) == 0)
printf(
"\n ");
365 printf(
"{%u,%u,%d}", (low & 127) == 99 ? 64 :
state.lencode[low].op,
366 state.lencode[low].bits,
state.lencode[low].val);
367 if (++low ==
size)
break;
372 printf(
"\n static const code distfix[%u] = {",
size);
375 if ((low % 6) == 0)
printf(
"\n ");
377 state.distcode[low].val);
378 if (++low ==
size)
break;
411 state->window = (
unsigned char FAR *)
413 sizeof(
unsigned char));
418 if (
state->wsize == 0) {
441 state->wnext += dist;
453# define UPDATE_CHECK(check, buf, len) \
454 (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
456# define UPDATE_CHECK(check, buf, len) adler32(check, buf, len)
461# define CRC2(check, word) \
463 hbuf[0] = (unsigned char)(word); \
464 hbuf[1] = (unsigned char)((word) >> 8); \
465 check = crc32(check, hbuf, 2); \
468# define CRC4(check, word) \
470 hbuf[0] = (unsigned char)(word); \
471 hbuf[1] = (unsigned char)((word) >> 8); \
472 hbuf[2] = (unsigned char)((word) >> 16); \
473 hbuf[3] = (unsigned char)((word) >> 24); \
474 check = crc32(check, hbuf, 4); \
481 put = strm->next_out; \
482 left = strm->avail_out; \
483 next = strm->next_in; \
484 have = strm->avail_in; \
485 hold = state->hold; \
486 bits = state->bits; \
492 strm->next_out = put; \
493 strm->avail_out = left; \
494 strm->next_in = next; \
495 strm->avail_in = have; \
496 state->hold = hold; \
497 state->bits = bits; \
511 if (have == 0) goto inf_leave; \
513 hold += (unsigned long)(*next++) << bits; \
521 while (bits < (unsigned)(n)) \
527 ((unsigned)hold & ((1U << (n)) - 1))
533 bits -= (unsigned)(n); \
643 unsigned char hbuf[4];
645 static const unsigned short order[19] =
646 {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
659 switch (
state->mode) {
661 if (
state->wrap == 0) {
667 if ((
state->wrap & 2) &&
hold == 0x8b1f) {
668 if (
state->wbits == 0)
677 state->head->done = -1;
678 if (!(
state->wrap & 1) ||
682 ((
BITS(8) << 8) + (
hold >> 8)) % 31) {
683 strm->msg = (
char *)
"incorrect header check";
688 strm->msg = (
char *)
"unknown compression method";
694 if (
state->wbits == 0)
697 strm->msg = (
char *)
"invalid window size";
713 strm->msg = (
char *)
"unknown compression method";
717 if (
state->flags & 0xe000) {
718 strm->msg = (
char *)
"unknown header flags set";
724 if ((
state->flags & 0x0200) && (
state->wrap & 4))
733 if ((
state->flags & 0x0200) && (
state->wrap & 4))
744 if ((
state->flags & 0x0200) && (
state->wrap & 4))
750 if (
state->flags & 0x0400) {
755 if ((
state->flags & 0x0200) && (
state->wrap & 4))
764 if (
state->flags & 0x0400) {
771 state->head->extra_max) {
776 if ((
state->flags & 0x0200) && (
state->wrap & 4))
782 if (
state->length)
goto inf_leave;
788 if (
state->flags & 0x0800) {
789 if (
have == 0)
goto inf_leave;
798 if ((
state->flags & 0x0200) && (
state->wrap & 4))
802 if (
len)
goto inf_leave;
810 if (
state->flags & 0x1000) {
811 if (
have == 0)
goto inf_leave;
820 if ((
state->flags & 0x0200) && (
state->wrap & 4))
824 if (
len)
goto inf_leave;
831 if (
state->flags & 0x0200) {
834 strm->msg = (
char *)
"header crc mismatch";
842 state->head->done = 1;
855 if (
state->havedict == 0) {
877 state->last ?
" (last)" :
""));
883 state->last ?
" (last)" :
""));
892 state->last ?
" (last)" :
""));
896 strm->msg = (
char *)
"invalid block type";
904 if ((
hold & 0xffff) != ((
hold >> 16) ^ 0xffff)) {
905 strm->msg = (
char *)
"invalid stored block lengths";
924 if (
copy == 0)
goto inf_leave;
944#ifndef PKZIP_BUG_WORKAROUND
946 strm->msg = (
char *)
"too many length or distance symbols";
961 while (
state->have < 19)
969 strm->msg = (
char *)
"invalid code lengths set";
981 if ((
unsigned)(here.
bits) <=
bits)
break;
989 if (here.
val == 16) {
992 if (
state->have == 0) {
993 strm->msg = (
char *)
"invalid bit length repeat";
1001 else if (here.
val == 17) {
1016 strm->msg = (
char *)
"invalid bit length repeat";
1029 if (
state->lens[256] == 0) {
1030 strm->msg = (
char *)
"invalid code -- missing end-of-block";
1044 strm->msg = (
char *)
"invalid literal/lengths set";
1049 state->distbits = 6;
1053 strm->msg = (
char *)
"invalid distances set";
1076 if ((
unsigned)(here.
bits) <=
bits)
break;
1079 if (here.
op && (here.
op & 0xf0) == 0) {
1093 if ((
int)(here.
op) == 0) {
1095 "inflate: literal '%c'\n" :
1096 "inflate: literal 0x%02x\n", here.
val));
1107 strm->msg = (
char *)
"invalid literal/length code";
1128 if ((
unsigned)(here.
bits) <=
bits)
break;
1131 if ((here.
op & 0xf0) == 0) {
1145 strm->msg = (
char *)
"invalid distance code";
1150 state->extra = (
unsigned)(here.
op) & 15;
1160#ifdef INFLATE_STRICT
1162 strm->msg = (
char *)
"invalid distance too far back";
1171 if (
left == 0)
goto inf_leave;
1177 strm->msg = (
char *)
"invalid distance too far back";
1181#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
1216 if (
left == 0)
goto inf_leave;
1231 if ((
state->wrap & 4) && (
1236 strm->msg = (
char *)
"incorrect data check";
1250 strm->msg = (
char *)
"incorrect length check";
1336 if (dictLength !=
Z_NULL)
1337 *dictLength =
state->whave;
1347 unsigned long dictid;
1360 if (dictid !=
state->check)
1371 state->havedict = 1;
1406const unsigned char FAR *
buf;
1414 while (
next <
len && got < 4) {
1415 if ((
int)(
buf[
next]) == (got < 2 ? 0 : 0xff))
1432 unsigned long in,
out;
1433 unsigned char buf[4];
1447 while (
state->bits >= 8) {
1464 if (
state->flags == -1)
1550#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
1551 state->sane = !subvert;
ios_base &_STLP_CALL fixed(ios_base &__s)
struct outqueuenode * head
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
int puts(const char *string)
#define crc32(crc, buf, len)
#define CRC2(check, word)
static int inflateReset2(z_streamp strm, int windowBits)
static int inflate_table(codetype type, unsigned short FAR *lens, unsigned codes, code FAR *FAR *table, unsigned FAR *bits, unsigned short FAR *work)
#define ZALLOC(strm, items, size)
static int inflateReset(z_streamp strm)
static int inflateResetKeep(z_streamp strm)
#define CRC4(check, word)
static void inflate_fast(z_streamp strm, unsigned start)
static int inflateStateCheck(z_streamp strm)
static void fixedtables(struct inflate_state FAR *state)
#define ZFREE(strm, addr)
int inflate(z_streamp strm, int flush)
static uLong adler32(uLong adler, const Bytef *buf, uInt len)
int inflateEnd(z_streamp strm)
static int updatewindow(z_streamp strm, const Bytef *end, unsigned copy)
void(* free_func)(voidpf opaque, voidpf address)
gz_header FAR * gz_headerp
voidpf(* alloc_func)(voidpf opaque, uInt items, uInt size)
static const WCHAR version[]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
#define check(expected, result)
#define wrap(journal, var)
void zcfree(voidpf opaque, voidpf ptr)
voidpf zcalloc(voidpf opaque, unsigned items, unsigned size)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLuint GLdouble GLdouble GLint GLint order
static IHTMLWindow2 * window
static unsigned(__cdecl *hash_bstr)(bstr_t s)
static unsigned __int64 next
int const char int stream_size
unsigned long ZEXPORT inflateCodesUsed(z_streamp strm)
int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength)
long ZEXPORT inflateMark(z_streamp strm)
int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength)
int ZEXPORT inflateSyncPoint(z_streamp strm)
int ZEXPORT inflatePrime(z_streamp strm, int bits, int value)
int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head)
int ZEXPORT inflateUndermine(z_streamp strm, int subvert)
int ZEXPORT inflateSync(z_streamp strm)
int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, const char *version, int stream_size)
unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, unsigned len)
int ZEXPORT inflateInit_(z_streamp strm, const char *version, int stream_size)
int ZEXPORT inflateCopy(z_streamp dest, z_streamp source)
#define UPDATE_CHECK(check, buf, len)
int ZEXPORT inflateValidate(z_streamp strm, int check)
static const code distfix[32]
static const code lenfix[512]