makefixed
OF((
void));
132 state->havedict = 0;
134 state->dmax = 32768U;
141 Tracev((stderr,
"inflate: reset\n"));
170 if(windowBits < 0) {
172windowBits = -windowBits;
175 wrap= (windowBits >> 4) + 5;
183 if(windowBits && (windowBits < 8 || windowBits > 15))
192 state->wbits = (unsigned)windowBits;
206stream_size != (
int)(
sizeof(
z_stream)))
227 Tracev((stderr,
"inflate: allocated\n"));
283 static intvirgin = 1;
285 static codefixed[544];
294 while(sym < 144)
state->lens[sym++] = 8;
295 while(sym < 256)
state->lens[sym++] = 9;
296 while(sym < 280)
state->lens[sym++] = 7;
297 while(sym < 288)
state->lens[sym++] = 8;
305 while(sym < 32)
state->lens[sym++] = 5;
319 state->distbits = 5;
349puts(
" /* inffixed.h -- table for decoding fixed codes");
350puts(
" * Generated automatically by makefixed().");
353puts(
" /* WARNING: this file should *not* be used by applications.");
354puts(
" It is part of the implementation of this library and is");
355puts(
" subject to change. Applications should only use zlib.h.");
359printf(
" static const code lenfix[%u] = {",
size);
362 if((low % 7) == 0) printf(
"\n ");
363printf(
"{%u,%u,%d}", (low & 127) == 99 ? 64 :
state.lencode[low].op,
364 state.lencode[low].bits,
state.lencode[low].val);
365 if(++low ==
size)
break;
370printf(
"\n static const code distfix[%u] = {",
size);
373 if((low % 6) == 0) printf(
"\n ");
374printf(
"{%u,%u,%d}",
state.distcode[low].op,
state.distcode[low].bits,
375 state.distcode[low].val);
376 if(++low ==
size)
break;
409 state->window = (
unsigned char FAR*)
411 sizeof(
unsigned char));
416 if(
state->wsize == 0) {
439 state->wnext += dist;
451 # define UPDATE_CHECK(check, buf, len) \ 452 (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) 454 # define UPDATE_CHECK(check, buf, len) adler32(check, buf, len) 459 # define CRC2(check, word) \ 461 hbuf[0] = (unsigned char)(word); \ 462 hbuf[1] = (unsigned char)((word) >> 8); \ 463 check = crc32(check, hbuf, 2); \ 466 # define CRC4(check, word) \ 468 hbuf[0] = (unsigned char)(word); \ 469 hbuf[1] = (unsigned char)((word) >> 8); \ 470 hbuf[2] = (unsigned char)((word) >> 16); \ 471 hbuf[3] = (unsigned char)((word) >> 24); \ 472 check = crc32(check, hbuf, 4); \ 479 put = strm->next_out; \ 480 left = strm->avail_out; \ 481 next = strm->next_in; \ 482 have = strm->avail_in; \ 483 hold = state->hold; \ 484 bits = state->bits; \ 490 strm->next_out = put; \ 491 strm->avail_out = left; \ 492 strm->next_in = next; \ 493 strm->avail_in = have; \ 494 state->hold = hold; \ 495 state->bits = bits; \ 509 if (have == 0) goto inf_leave; \ 511 hold += (unsigned long)(*next++) << bits; \ 517 #define NEEDBITS(n) \ 519 while (bits < (unsigned)(n)) \ 525 ((unsigned)hold & ((1U << (n)) - 1)) 528 #define DROPBITS(n) \ 531 bits -= (unsigned)(n); \ 629 unsigned char FAR*put;
630 unsigned have, left;
635 unsigned char FAR*from;
641 unsigned charhbuf[4];
643 static const unsigned shortorder[19] =
644{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
657 switch(
state->mode) {
659 if(
state->wrap == 0) {
665 if((
state->wrap & 2) &&
hold== 0x8b1f) {
666 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";
701 Tracev((stderr,
"inflate: zlib header ok\n"));
711 strm->
msg= (
char*)
"unknown compression method";
715 if(
state->flags & 0xe000) {
716 strm->
msg= (
char*)
"unknown header flags set";
722 if((
state->flags & 0x0200) && (
state->wrap & 4))
731 if((
state->flags & 0x0200) && (
state->wrap & 4))
742 if((
state->flags & 0x0200) && (
state->wrap & 4))
748 if(
state->flags & 0x0400) {
752 state->head->extra_len = (unsigned)
hold;
753 if((
state->flags & 0x0200) && (
state->wrap & 4))
762 if(
state->flags & 0x0400) {
773 if((
state->flags & 0x0200) && (
state->wrap & 4))
779 if(
state->length)
gotoinf_leave;
785 if(
state->flags & 0x0800) {
786 if(
have== 0)
gotoinf_leave;
795 if((
state->flags & 0x0200) && (
state->wrap & 4))
799 if(
len)
gotoinf_leave;
807 if(
state->flags & 0x1000) {
808 if(
have== 0)
gotoinf_leave;
817 if((
state->flags & 0x0200) && (
state->wrap & 4))
821 if(
len)
gotoinf_leave;
828 if(
state->flags & 0x0200) {
831 strm->
msg= (
char*)
"header crc mismatch";
839 state->head->done = 1;
852 if(
state->havedict == 0) {
873 Tracev((stderr,
"inflate: stored block%s\n",
874 state->last ?
" (last)":
""));
879 Tracev((stderr,
"inflate: fixed codes block%s\n",
880 state->last ?
" (last)":
""));
888 Tracev((stderr,
"inflate: dynamic codes block%s\n",
889 state->last ?
" (last)":
""));
893 strm->
msg= (
char*)
"invalid block type";
901 if((
hold& 0xffff) != ((
hold>> 16) ^ 0xffff)) {
902 strm->
msg= (
char*)
"invalid stored block lengths";
906 state->length = (unsigned)
hold& 0xffff;
907 Tracev((stderr,
"inflate: stored length %u\n",
911 if(flush ==
Z_TREES)
gotoinf_leave;
921 if(
copy== 0)
gotoinf_leave;
930 Tracev((stderr,
"inflate: stored end\n"));
941 #ifndef PKZIP_BUG_WORKAROUND 942 if(
state->nlen > 286 ||
state->ndist > 30) {
943 strm->
msg= (
char*)
"too many length or distance symbols";
948 Tracev((stderr,
"inflate: table sizes ok\n"));
955 state->lens[order[
state->have++]] = (
unsignedshort)
BITS(3);
958 while(
state->have < 19)
966 strm->
msg= (
char*)
"invalid code lengths set";
970 Tracev((stderr,
"inflate: code lengths ok\n"));
978 if((
unsigned)(here.
bits) <=
bits)
break;
981 if(here.
val< 16) {
986 if(here.
val== 16) {
989 if(
state->have == 0) {
990 strm->
msg= (
char*)
"invalid bit length repeat";
998 else if(here.
val== 17) {
1013 strm->
msg= (
char*)
"invalid bit length repeat";
1026 if(
state->lens[256] == 0) {
1027 strm->
msg= (
char*)
"invalid code -- missing end-of-block";
1037 state->lenbits = 9;
1041 strm->
msg= (
char*)
"invalid literal/lengths set";
1046 state->distbits = 6;
1050 strm->
msg= (
char*)
"invalid distances set";
1054 Tracev((stderr,
"inflate: codes ok\n"));
1056 if(flush ==
Z_TREES)
gotoinf_leave;
1062 if(
have>= 6 && left >= 258) {
1073 if((
unsigned)(here.
bits) <=
bits)
break;
1076 if(here.
op&& (here.
op& 0xf0) == 0) {
1081 if((
unsigned)(
last.bits + here.
bits) <=
bits)
break;
1089 state->length = (unsigned)here.
val;
1090 if((
int)(here.
op) == 0) {
1092 "inflate: literal '%c'\n":
1093 "inflate: literal 0x%02x\n", here.
val));
1097 if(here.
op& 32) {
1098 Tracevv((stderr,
"inflate: end of block\n"));
1103 if(here.
op& 64) {
1104 strm->
msg= (
char*)
"invalid literal/length code";
1108 state->extra = (unsigned)(here.
op) & 15;
1112 if(
state->extra) {
1118 Tracevv((stderr,
"inflate: length %u\n",
state->length));
1125 if((
unsigned)(here.
bits) <=
bits)
break;
1128 if((here.
op& 0xf0) == 0) {
1133 if((
unsigned)(
last.bits + here.
bits) <=
bits)
break;
1141 if(here.
op& 64) {
1142 strm->
msg= (
char*)
"invalid distance code";
1146 state->offset = (unsigned)here.
val;
1147 state->extra = (
unsigned)(here.
op) & 15;
1151 if(
state->extra) {
1157 #ifdef INFLATE_STRICT 1159 strm->
msg= (
char*)
"invalid distance too far back";
1164 Tracevv((stderr,
"inflate: distance %u\n",
state->offset));
1168 if(left == 0)
gotoinf_leave;
1173 if(
state->sane) {
1174 strm->
msg= (
char*)
"invalid distance too far back";
1178 #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR 1179 Trace((stderr,
"inflate.c too far\n"));
1201from = put -
state->offset;
1213 if(left == 0)
gotoinf_leave;
1214*put++ = (
unsignedchar)(
state->length);
1219 if(
state->wrap) {
1228 if((
state->wrap & 4) && (
1233 strm->
msg= (
char*)
"incorrect data check";
1238 Tracev((stderr,
"inflate: check matches trailer\n"));
1246 if((
state->wrap & 4) &&
hold!= (
state->total & 0xffffffff)) {
1247 strm->
msg= (
char*)
"incorrect length check";
1252 Tracev((stderr,
"inflate: length matches trailer\n"));
1311 Tracev((stderr,
"inflate: end\n"));
1333 if(dictLength !=
Z_NULL)
1334*dictLength =
state->whave;
1340 const Bytef*dictionary;
1344 unsigned longdictid;
1356dictid =
adler32(dictid, dictionary, dictLength);
1357 if(dictid !=
state->check)
1368 state->havedict = 1;
1369 Tracev((stderr,
"inflate: dictionary set\n"));
1403 const unsigned char FAR*
buf;
1411 while(
next<
len&& got < 4) {
1412 if((
int)(
buf[
next]) == (got < 2 ? 0 : 0xff))
1429 unsigned long in,
out;
1430 unsigned char buf[4];
1444 while(
state->bits >= 8) {
1461 if(
state->flags == -1)
1547#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
1548 state->sane = !subvert;
1580return (
long)(((
unsignedlong)((
long)
state->back)) << 16) +
1591return (
unsigned long)(
state->next -
state->codes);
std::ofstream out("events_result.xml")
main entry point for tests
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
void Trace(CExceptionArgs_Base &args)
unsigned int
A callback function used to compare two keys in a database.
if(yy_accept[yy_current_state])
const string version
version string
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
const CharType(& source)[N]
std::istream & in(std::istream &in_, double &x_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
unsigned char FAR * window
struct internal_state * state
static const code distfix[32]
static const code lenfix[512]
void fixedtables(struct inflate_state FAR *state)
unsigned long ZEXPORT inflateCodesUsed(z_streamp strm)
int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength)
int inflateStateCheck OF((z_streamp strm))
#define CRC2(check, word)
long ZEXPORT inflateMark(z_streamp strm)
int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength)
int ZEXPORT inflateSyncPoint(z_streamp strm)
#define CRC4(check, word)
int inflateStateCheck(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 inflateResetKeep(z_streamp strm)
int ZEXPORT inflate(z_streamp strm, int flush)
int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, const char *version, int stream_size)
int updatewindow(z_streamp strm, const Bytef *end, unsigned copy)
unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, unsigned len)
int ZEXPORT inflateReset(z_streamp strm)
int ZEXPORT inflateInit_(z_streamp strm, const char *version, int stream_size)
int ZEXPORT inflateEnd(z_streamp strm)
int ZEXPORT inflateCopy(z_streamp dest, z_streamp source)
#define UPDATE_CHECK(check, buf, len)
int ZEXPORT inflateValidate(z_streamp strm, int check)
int ZEXPORT inflateReset2(z_streamp strm, int windowBits)
#define ZALLOC(strm, items, size)
#define ZFREE(strm, addr)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4