100 void makefixed
OF((
void));
182 if (
windowBits && (windowBits < 8 || windowBits > 15))
282 static int virgin = 1;
293 while (sym < 144)
state->lens[sym++] = 8;
294 while (sym < 256)
state->lens[sym++] = 9;
295 while (sym < 280)
state->lens[sym++] = 7;
296 while (sym < 288)
state->lens[sym++] = 8;
304 while (sym < 32)
state->lens[sym++] = 5;
348 puts(
" /* inffixed.h -- table for decoding fixed codes");
349 puts(
" * Generated automatically by makefixed().");
352 puts(
" /* WARNING: this file should *not* be used by applications.");
353 puts(
" It is part of the implementation of this library and is");
354 puts(
" subject to change. Applications should only use zlib.h.");
358 printf(
" static const code lenfix[%u] = {",
size);
361 if ((low % 7) == 0)
printf(
"\n ");
362 printf(
"{%u,%u,%d}", (low & 127) == 99 ? 64 :
state.lencode[low].op,
363 state.lencode[low].bits,
state.lencode[low].val);
364 if (++low ==
size)
break;
369 printf(
"\n static const code distfix[%u] = {",
size);
372 if ((low % 6) == 0)
printf(
"\n ");
374 state.distcode[low].val);
375 if (++low ==
size)
break;
408 state->window = (
unsigned char FAR *)
410 sizeof(
unsigned char));
415 if (
state->wsize == 0) {
438 state->wnext += dist;
450 # define UPDATE(check, buf, len) \ 451 (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) 453 # define UPDATE(check, buf, len) adler32(check, buf, len) 458 # define CRC2(check, word) \ 460 hbuf[0] = (unsigned char)(word); \ 461 hbuf[1] = (unsigned char)((word) >> 8); \ 462 check = crc32(check, hbuf, 2); \ 465 # define CRC4(check, word) \ 467 hbuf[0] = (unsigned char)(word); \ 468 hbuf[1] = (unsigned char)((word) >> 8); \ 469 hbuf[2] = (unsigned char)((word) >> 16); \ 470 hbuf[3] = (unsigned char)((word) >> 24); \ 471 check = crc32(check, hbuf, 4); \ 478 put = strm->next_out; \ 479 left = strm->avail_out; \ 480 next = strm->next_in; \ 481 have = strm->avail_in; \ 482 hold = state->hold; \ 483 bits = state->bits; \ 489 strm->next_out = put; \ 490 strm->avail_out = left; \ 491 strm->next_in = next; \ 492 strm->avail_in = have; \ 493 state->hold = hold; \ 494 state->bits = bits; \ 508 if (have == 0) goto inf_leave; \ 510 hold += (unsigned long)(*next++) << bits; \ 516 #define NEEDBITS(n) \ 518 while (bits < (unsigned)(n)) \ 524 ((unsigned)hold & ((1U << (n)) - 1)) 527 #define DROPBITS(n) \ 530 bits -= (unsigned)(n); \ 640 unsigned char hbuf[4];
642 static const unsigned short order[19] =
643 {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
656 switch (
state->mode) {
658 if (
state->wrap == 0) {
664 if ((
state->wrap & 2) &&
hold == 0x8b1f) {
665 if (
state->wbits == 0)
675 state->head->done = -1;
676 if (!(
state->wrap & 1) ||
680 ((
BITS(8) << 8) + (
hold >> 8)) % 31) {
681 strm->msg = (
char *)
"incorrect header check";
686 strm->msg = (
char *)
"unknown compression method";
692 if (
state->wbits == 0)
695 strm->msg = (
char *)
"invalid window size";
710 strm->msg = (
char *)
"unknown compression method";
714 if (
state->flags & 0xe000) {
715 strm->msg = (
char *)
"unknown header flags set";
721 if ((
state->flags & 0x0200) && (
state->wrap & 4))
729 if ((
state->flags & 0x0200) && (
state->wrap & 4))
739 if ((
state->flags & 0x0200) && (
state->wrap & 4))
744 if (
state->flags & 0x0400) {
749 if ((
state->flags & 0x0200) && (
state->wrap & 4))
757 if (
state->flags & 0x0400) {
768 if ((
state->flags & 0x0200) && (
state->wrap & 4))
774 if (
state->length)
goto inf_leave;
779 if (
state->flags & 0x0800) {
780 if (
have == 0)
goto inf_leave;
789 if ((
state->flags & 0x0200) && (
state->wrap & 4))
793 if (
len)
goto inf_leave;
800 if (
state->flags & 0x1000) {
801 if (
have == 0)
goto inf_leave;
810 if ((
state->flags & 0x0200) && (
state->wrap & 4))
814 if (
len)
goto inf_leave;
820 if (
state->flags & 0x0200) {
823 strm->msg = (
char *)
"header crc mismatch";
831 state->head->done = 1;
843 if (
state->havedict == 0) {
863 state->last ?
" (last)" :
""));
869 state->last ?
" (last)" :
""));
878 state->last ?
" (last)" :
""));
882 strm->msg = (
char *)
"invalid block type";
890 if ((
hold & 0xffff) != ((
hold >> 16) ^ 0xffff)) {
891 strm->msg = (
char *)
"invalid stored block lengths";
908 if (
copy == 0)
goto inf_leave;
928 #ifndef PKZIP_BUG_WORKAROUND 930 strm->msg = (
char *)
"too many length or distance symbols";
944 while (
state->have < 19)
952 strm->msg = (
char *)
"invalid code lengths set";
963 if ((
unsigned)(here.
bits) <=
bits)
break;
971 if (here.
val == 16) {
974 if (
state->have == 0) {
975 strm->msg = (
char *)
"invalid bit length repeat";
983 else if (here.
val == 17) {
998 strm->msg = (
char *)
"invalid bit length repeat";
1011 if (
state->lens[256] == 0) {
1012 strm->msg = (
char *)
"invalid code -- missing end-of-block";
1026 strm->msg = (
char *)
"invalid literal/lengths set";
1031 state->distbits = 6;
1035 strm->msg = (
char *)
"invalid distances set";
1056 if ((
unsigned)(here.
bits) <=
bits)
break;
1059 if (here.
op && (here.
op & 0xf0) == 0) {
1073 if ((
int)(here.
op) == 0) {
1075 "inflate: literal '%c'\n" :
1076 "inflate: literal 0x%02x\n", here.
val));
1087 strm->msg = (
char *)
"invalid literal/length code";
1106 if ((
unsigned)(here.
bits) <=
bits)
break;
1109 if ((here.
op & 0xf0) == 0) {
1123 strm->msg = (
char *)
"invalid distance code";
1128 state->extra = (
unsigned)(here.
op) & 15;
1137 #ifdef INFLATE_STRICT 1139 strm->msg = (
char *)
"invalid distance too far back";
1147 if (
left == 0)
goto inf_leave;
1153 strm->msg = (
char *)
"invalid distance too far back";
1157 #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR 1192 if (
left == 0)
goto inf_leave;
1207 if ((
state->wrap & 4) && (
1212 strm->msg = (
char *)
"incorrect data check";
1224 if (
hold != (
state->total & 0xffffffffUL)) {
1225 strm->msg = (
char *)
"incorrect length check";
1309 if (dictLength !=
Z_NULL)
1310 *dictLength =
state->whave;
1320 unsigned long dictid;
1333 if (dictid !=
state->check)
1344 state->havedict = 1;
1379 const unsigned char FAR *
buf;
1387 while (
next <
len && got < 4) {
1388 if ((
int)(
buf[
next]) == (got < 2 ? 0 : 0xff))
1404 unsigned long in,
out;
1405 unsigned char buf[4];
1419 while (
state->bits >= 8) {
1516 #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
1517 state->sane = !subvert;
GLuint GLdouble GLdouble GLint GLint order
#define crc32(crc, buf, len)
unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, unsigned len)
int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength)
int inflateStateCheck OF((z_streamp strm))
struct outqueuenode * head
static const code lenfix[512]
int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength)
void fixedtables(struct inflate_state FAR *state)
int ZEXPORT inflateReset(z_streamp strm)
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLenum GLuint GLenum GLsizei const GLchar * buf
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
ios_base &_STLP_CALL fixed(ios_base &__s)
#define ZFREE(strm, addr)
void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start)
static const WCHAR version[]
int ZEXPORT inflateInit_(z_streamp strm, const char *version, int stream_size)
int ZEXPORT inflateSync(z_streamp strm)
int inflateStateCheck(z_streamp strm)
unsigned long ZEXPORT inflateCodesUsed(z_streamp strm)
void(* free_func)(voidpf opaque, voidpf address)
static const unsigned char dictionary[][3]
int const char int stream_size
int ZEXPORT inflateCopy(z_streamp dest, z_streamp source)
int ZEXPORT inflatePrime(z_streamp strm, int bits, int value)
#define CRC4(check, word)
void check(CONTEXT *pContext)
int inflateEnd(z_streamp strm)
int ZEXPORT inflateResetKeep(z_streamp strm)
GLsizei const GLfloat * value
static IHTMLWindow2 * window
#define ZALLOC(strm, items, size)
int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head)
int puts(const char *string)
int ZEXPORT inflateReset2(z_streamp strm, int windowBits)
int updatewindow(z_streamp strm, const Bytef *end, unsigned copy)
gz_header FAR * gz_headerp
static const code distfix[32]
static unsigned __int64 next
#define CRC2(check, word)
void zcfree(voidpf opaque, voidpf ptr)
GLsizei GLsizei GLchar * source
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
voidpf zcalloc(voidpf opaque, unsigned items, unsigned size)
int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, const char *version, int stream_size)
voidpf(* alloc_func)(voidpf opaque, uInt items, uInt size)
#define UPDATE(check, buf, len)
long ZEXPORT inflateMark(z_streamp strm)
int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, unsigned codes, code FAR *FAR *table, unsigned FAR *bits, unsigned short FAR *work)
#define wrap(journal, var)
int inflate(z_streamp strm, int flush)
int ZEXPORT inflateValidate(z_streamp strm, int check)
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len)
int ZEXPORT inflateSyncPoint(z_streamp strm)
int ZEXPORT inflateUndermine(z_streamp strm, int subvert)
static unsigned(__cdecl *hash_bstr)(bstr_t s)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *