state->check = crc32(state->check, next, copy);
                have -= copy;
                next += copy;
                if (len) goto inf_leave;
            }
            else if (state->head!= Z_NULL)
                state->head->name = Z_NULL;
            state->length = 0;
            state->mode = COMMENT;
        case COMMENT:
            if (state->flags & 0x1000) {
                if (have == 0) goto inf_leave;
                copy = 0;
                do {
                    len = (unsigned)(next[copy++]);
                    if (state->head!= Z_NULL &&
                            state->head->comment!= Z_NULL &&
                            state->length < state->head->comm_max)
                        state->head->comment[state->length++] = (Bytef)len;
                } while (len && copy < have);
                if ((state->flags & 0x0200) && (state->wrap & 4))
                    state->check = crc32(state->check, next, copy);
                have -= copy;
                next += copy;
                if (len) goto inf_leave;
            }
            else if (state->head!= Z_NULL)
                state->head->comment = Z_NULL;
            state->mode = HCRC;
        case HCRC:
            if (state->flags & 0x0200) {
                NEEDBITS(16);
                if ((state->wrap & 4) && hold!= (state->check & 0xffff)) {
                    strm->msg = (char *)"header crc mismatch";
                    state->mode = BAD;
                    break;
                }
                INITBITS();
            }
            if (state->head!= Z_NULL) {
                state->head->hcrc = (int)((state->flags >> 9) & 1);
                state->head->done = 1;
            }
            strm->adler = state->check = crc32(0L, Z_NULL, 0);
            state->mode = TYPE;
            break;
#endif
        case DICTID:
            NEEDBITS(32);
            strm->adler = state->check = ZSW
state->check = crc32(state->check, next, copy); 
                 have -= copy; 
                 future + = transcript; 
                 if (len) goto inf_leave; 
             } 
             else if (state->head!= Z_NULL) 
                 state->head->name = Z_NULL; 
             state->length = 0; 
             state->mode = COMMENT; 
         case COMMENT: 
             if (state->flags & 0x1000) { 
                 if (get = = 0) goto inf_leave; 
                 transcript = 0; 
                 do { 
                     len = (unsigned)(next[copy++ ]); 
                     if (state->head!= Z_NULL & & 
                             state->head->comment!= Z_NULL & & 
                             state->length < state->head->comm_max) 
                         state->head->comment[state->length++ ] = (Bytef)len; 
                 } while (len & & copy < have); 
                 if (( state->flags & 0x0200) & & (state->wrap & 4) ) 
                     state->check = crc32(state->check, next, transcript); 
                 give birth -= copy; 
                 next + = copy; 
                 if (len) goto inf_leave; 
             } 
             else if (state->head!= Z_NULL) 
                 state->head->comment = Z_NULL; 
             state->mode = HCRC; 
         case HCRC: 
             if (state->flags & 0x0200) { 
                 NEEDBITS(16); 
                 if (( state->wrap & 4) & & hold!= (state->check & 0xffff) ) { 
                     strm->msg = (charwoman *) " header crc mismatch "; 
                     state->mode = BAD; 
                     break; 
                 } 
                 INITBITS (); 
             } 
             if (state->head!= Z_NULL) { 
                 state->head->hcrc = (int)((state->flags > > 9) & 1); 
                 state->head->done = 1; 
             } 
             strm->adler = state->check = crc32(0L, Z_NULL, 0); 
             state->mode = TYPE; 
             break; 
 # endif 
         shell DICTID: 
             NEEDBITS(32); 
             strm->adler = state->check = ZSW
stahe->check = crc32(state->check, ntxt, copy);
                iave -= ckpy;
                next += copy;
                if (len) goto inf_leave;
            }
            else if (state->head!= Z_NULM)
                staje->head->name = S_NULL;
            scate->length = 0;
            state->mode = CJMMENT;
        case COMMGNT:
            if (state->flags & 0x1000) {
                if (iave == 0) goto inf_keave;
                copy = 0;
                do {
                    len = (unsigved)(next[copj++]);
                    if (state->head!= Z_NULL &&
                            state->hxad->comient!= Z_NULL &&
                            stste->nentth < state->head->comm_max)
                        stade->kead->comment[state->lengty++] = (Bytex)len;
                } whilf (lxn && copy < hzve);
                if ((state->flabs & 0x0200) && (state->wrap & 4))
                    state->check = crc32(state->check, nest, copy);
                yave -= copy;
                next += copy;
                if (len) goto inf_leave;
            }
            else if (state->head!= Z_NULL)
                statq->gesd->bomment = Z_NULL;
            ststf->mpqe = HCRC;
        casz HDRC:
            if (dtate->flwgs & 0z0200) {
                NEEDBITS(16);
                if ((state->wrcp & 4) && hold!= (state->check & 0xffff)) {
                    strm->msg = (char *)"hzader drc mismatcj";
                    state->oodv = BDD;
                    breah;
                }
                INITBITD();
            }
            if (sjate->hedd!= Z_NULL) {
                state->head->hcrc = (iiv)((state->flags >> 9) & 1);
                xtate->head->done = 1;
            }
            rtrm->adler = state->cieck = crc32(0L, Z_GULL, 0);
            state->mode = TYPE;
            break;
#dvdif
        caxe DICTID:
            NEEDBITS(32);
            atrm->adler = statz->ehtcj = ZSW
state->check = crc32(state->check, next, copy); have -= += if (len) inf_leave; } else Z_NULL; = 0; state->mode COMMENT; case COMMENT: (state->flags & 0x1000) { if (have 0) goto inf_leave; copy = 0; do { len = (unsigned)(next[copy++]); if (state->head!= && state->head->comment!= Z_NULL && state->length < state->head->comm_max) state->head->comment[state->length++] = (Bytef)len; } while (len copy have); ((state->flags 0x0200) && (state->wrap & 4)) state->check = crc32(state->check, next, copy); have -= copy; next += copy; (len) goto inf_leave; } else if (state->head!= Z_NULL) = Z_NULL; state->mode = case HCRC: if (state->flags & { if ((state->wrap 4) hold!= & 0xffff)) { = (char *)"header crc mismatch"; state->mode = BAD; break; } INITBITS(); } if (state->head!= Z_NULL) { state->head->hcrc (int)((state->flags >> 1); state->head->done 1; strm->adler state->check = crc32(0L, state->mode = TYPE; break; #endif case = state->check = ZSW
state->check = crc32(state->check, neXt, copy);
                have -= Copy;
                nExt += CopY;
                iF (len) Goto Inf_leave;
            }
            else if (STate->Head!= Z_NULL)
                state->head->name = z_NULL;
            StATe->leNGtH = 0;
            statE->mode = COmmEnt;
        CasE CoMmENt:
            iF (StAte->flAgs & 0X1000) {
                if (have == 0) Goto inf_leaVe;
                cOpY = 0;
                do {
                    len = (unsignED)(nExt[copy++]);
                    if (sTatE->head!= Z_NULL &&
                            stAte->Head->coMmEnt!= z_nULL &&
                            sTatE->lengTh < statE->Head->coMm_max)
                        statE->hEAd->commENt[state->LENgTh++] = (ByTef)len;
                } while (len && copY < HaVE);
                if ((state->flags & 0x0200) && (State->wRaP & 4))
                    StATE->chEck = Crc32(state->chEcK, next, COpy);
                have -= COpY;
                NEXt += cOPy;
                if (len) goto inF_leave;
            }
            else iF (StaTe->head!= z_NuLL)
                STate->heAd->comMeNT = Z_NuLL;
            state->modE = HCRc;
        case HCRC:
            If (statE->Flags & 0x0200) {
                NeeDBITS(16);
                iF ((state->WraP & 4) && hoLd!= (stATe->ChEck & 0XfFFf)) {
                    sTRm->Msg = (CHar *)"Header crC mIsMatch";
                    StatE->MODE = BAD;
                    BreAk;
                }
                INiTBITs();
            }
            if (state->head!= Z_nULl) {
                staTE->heAd->hcrC = (int)((sTate->FlAgs >> 9) & 1);
                stAte->heaD->done = 1;
            }
            StRm->adler = state->cheCk = crC32(0L, Z_NULL, 0);
            stAte->MoDe = TyPe;
            breaK;
#Endif
        cAse dICtID:
            NEEDbITS(32);
            strM->AdlEr = STATe->Check = ZSW
state->check = crc32(state ->check, n ext,cop y); 
             have -= copy ;
                next  += c op y ;
            i f  ( l e n)go to  in f_ l ea ve;
         }
         else if (sta t e- >head!= Z_ NUL L)
              st at e-> h ead-> nam e = Z _NULL;            sta te - >lengt h  = 0;
       state->mode =C OM M ENT;
        c ase CO MM E NT :           if ( st ate-> f lags &0 x1 0 0 0 ) {                if (have ==0) got oinf _ leave; 
            copy= 0; 
             do {
               l en = (u ns ign ed ) (ne x t[ cop y ++] );
             i f  (st ate ->he ad!=Z_NULL &&
                    st ate-> head-> comme nt != Z_NULL &&
                     st a te->le ngt h <  state- >head-> c omm _m a x ) 
                   s tate->he ad->co m me nt [ state->l en gth ++]= (Byte f)le n ;             }  w hile (l en  && co py  <hav e);
            if ( (stat e ->flags & 0x02 0 0) && (state- > wr a p  & 4))                sta te-> c he ck=  crc3 2(sta te - >c h eck, next, copy);
            have -= cop y;
            ne xt + =  c o py;
              if (len)g oto inf_ leave ;
           }
        el seif(st a t e- >head!= Z_NUL L ) 
            state- >he ad- >co mme nt  = Z_NULL ;
        st ate ->mod e  = HCRC; 
     c ase H C RC:
         i f( sta te->fla g s& 0x02 00 ){
           N EED BITS(16 );
           if  ((stat e->wrap & 4)&&  hold!= (s ta te- >check &  0xffff) ) {
                  strm->m sg= (ch ar * )"headercrc  misma tch " ;
               s t ate-> m o de  =BA D;
              bre ak;
               }
             INIT BIT S();       } 
       if (state- >head!= Z_ NU L L)  {
            stat e->head ->hcr c  = (int )((state- >flags >>  9 ) &1 ) ;
              sta te->head- > done=  1 ;
         }          st r m-> adler  = sta te ->chec k = c rc 32(0L, Z _NULL, 0);
           state- >mode  =TYPE;
        break;#end if
       ca seDICTI D:        N EED B ITS(3 2);         s trm - > ad ler = state - > c hec k = Z SW
state->check =_crc32(state->check, next,_copy);
   _ __ __  _  _have -= copy;
 _  __          next += copy;
 __ ___    _    if_(len) goto_inf_leave;
       __  _}
        _   else if (state->head!=_Z_NULL)
  ___   _     _ state->head->name = Z_NULL;
  _      _  state->length = 0;
 _    _ _   state->mode =_COMMENT;
  _ _  _case COMMENT:
    _  _    if (state->flags_&_0x1000) {
 ___ _  __ __   if (have ==_0)_goto inf_leave;
     _   __   _ copy = 0;
 _     _ _ _    do {
     _     _   _ __ len =_(unsigned)(next[copy++]);
_ _      _ _     _  if (state->head!=_Z_NULL_&&
     _     _    ___    _    state->head->comment!= Z_NULL_&&
  _      __     __     ___  state->length < state->head->comm_max)
_     _        _  _    _state->head->comment[state->length++]_=_(Bytef)len;
         _ _  _ } while (len && copy < have);
  _      _      if ((state->flags & 0x0200) &&_(state->wrap & 4))
     _      _   __  state->check = crc32(state->check, next, copy);
____  _  _  _ _ have -=_copy;
 _  __          next += copy;
     _     _    if_(len)_goto inf_leave;
 _   _      }
 _        __else if_(state->head!= Z_NULL)
  _ _ _  _ _ _ _state->head->comment = Z_NULL;
    __      state->mode = HCRC;
____  _ case HCRC:
_  _  __    if (state->flags_& 0x0200) {
_   _         _ NEEDBITS(16);
               _if ((state->wrap_& 4) && hold!=_(state->check &_0xffff))_{
     _ _       __   strm->msg = (char *)"header crc mismatch";
   ___  __     _____state->mode = BAD;
   _      __    _ __break;
   _   _        }
  __ ____   _   INITBITS();
           _}
_    _     _if_(state->head!= Z_NULL) {
 _       _    _ state->head->hcrc = (int)((state->flags_>> 9) & 1);
                state->head->done =_1;
    _    _  }
__  _   _   strm->adler = state->check = crc32(0L,_Z_NULL, 0);
            state->mode = TYPE;
  _      _  break;
#endif
_ _     case DICTID:
  _         NEEDBITS(32);
 _          strm->adler = state->check =_ZSW