亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? infblock.c

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? C
字號:
/* infblock.c -- interpret and process block types to last block
 * Copyright (C) 1995-2002 Mark Adler
 * For conditions of distribution and use, see copyright notice in zlib.h 
 */

#include "zutil.h"
#include "infblock.h"
#include "inftrees.h"
#include "infcodes.h"
#include "infutil.h"

struct inflate_codes_state {int dummy;}; /* for buggy compilers */

/* simplify the use of the inflate_huft type with some defines */
#define exop word.what.Exop
#define bits word.what.Bits

/* Table for deflate from PKZIP's appnote.txt. */
local const uInt border[] = { /* Order of the bit length code lengths */
        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};

/*
   Notes beyond the 1.93a appnote.txt:

   1. Distance pointers never point before the beginning of the output
      stream.
   2. Distance pointers can point back across blocks, up to 32k away.
   3. There is an implied maximum of 7 bits for the bit length table and
      15 bits for the actual data.
   4. If only one code exists, then it is encoded using one bit.  (Zero
      would be more efficient, but perhaps a little confusing.)  If two
      codes exist, they are coded using one bit each (0 and 1).
   5. There is no way of sending zero distance codes--a dummy must be
      sent if there are none.  (History: a pre 2.0 version of PKZIP would
      store blocks with no distance codes, but this was discovered to be
      too harsh a criterion.)  Valid only for 1.93a.  2.04c does allow
      zero distance codes, which is sent as one code of zero bits in
      length.
   6. There are up to 286 literal/length codes.  Code 256 represents the
      end-of-block.  Note however that the static length tree defines
      288 codes just to fill out the Huffman codes.  Codes 286 and 287
      cannot be used though, since there is no length base or extra bits
      defined for them.  Similarily, there are up to 30 distance codes.
      However, static trees define 32 codes (all 5 bits) to fill out the
      Huffman codes, but the last two had better not show up in the data.
   7. Unzip can check dynamic Huffman blocks for complete code sets.
      The exception is that a single code would not be complete (see #4).
   8. The five bits following the block type is really the number of
      literal codes sent minus 257.
   9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
      (1+6+6).  Therefore, to output three times the length, you output
      three codes (1+1+1), whereas to output four times the same length,
      you only need two codes (1+3).  Hmm.
  10. In the tree reconstruction algorithm, Code = Code + Increment
      only if BitLength(i) is not zero.  (Pretty obvious.)
  11. Correction: 4 Bits: # of Bit Length codes - 4     (4 - 19)
  12. Note: length code 284 can represent 227-258, but length code 285
      really is 258.  The last length deserves its own, short code
      since it gets used a lot in very redundant files.  The length
      258 is special since 258 - 3 (the min match length) is 255.
  13. The literal/length and distance code bit lengths are read as a
      single stream of lengths.  It is possible (and advantageous) for
      a repeat code (16, 17, or 18) to go across the boundary between
      the two sets of lengths.
 */


void inflate_blocks_reset(s, z, c)
inflate_blocks_statef *s;
z_streamp z;
uLongf *c;
{
  if (c != Z_NULL)
    *c = s->check;
  if (s->mode == BTREE || s->mode == DTREE)
    ZFREE(z, s->sub.trees.blens);
  if (s->mode == CODES)
    inflate_codes_free(s->sub.decode.codes, z);
  s->mode = TYPE;
  s->bitk = 0;
  s->bitb = 0;
  s->read = s->write = s->window;
  if (s->checkfn != Z_NULL)
    z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0);
  Tracev((stderr, "inflate:   blocks reset\n"));
}


inflate_blocks_statef *inflate_blocks_new(z, c, w)
z_streamp z;
check_func c;
uInt w;
{
  inflate_blocks_statef *s;

  if ((s = (inflate_blocks_statef *)ZALLOC
       (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)
    return s;
  if ((s->hufts =
       (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL)
  {
    ZFREE(z, s);
    return Z_NULL;
  }
  if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)
  {
    ZFREE(z, s->hufts);
    ZFREE(z, s);
    return Z_NULL;
  }
  s->end = s->window + w;
  s->checkfn = c;
  s->mode = TYPE;
  Tracev((stderr, "inflate:   blocks allocated\n"));
  inflate_blocks_reset(s, z, Z_NULL);
  return s;
}


int inflate_blocks(s, z, r)
inflate_blocks_statef *s;
z_streamp z;
int r;
{
  uInt t;               /* temporary storage */
  uLong b;              /* bit buffer */
  uInt k;               /* bits in bit buffer */
  Bytef *p;             /* input data pointer */
  uInt n;               /* bytes available there */
  Bytef *q;             /* output window write pointer */
  uInt m;               /* bytes to end of window or read pointer */

  /* copy input/output information to locals (UPDATE macro restores) */
  LOAD

  /* process input based on current state */
  while (1) switch (s->mode)
  {
    case TYPE:
      NEEDBITS(3)
      t = (uInt)b & 7;
      s->last = t & 1;
      switch (t >> 1)
      {
        case 0:                         /* stored */
          Tracev((stderr, "inflate:     stored block%s\n",
                 s->last ? " (last)" : ""));
          DUMPBITS(3)
          t = k & 7;                    /* go to byte boundary */
          DUMPBITS(t)
          s->mode = LENS;               /* get length of stored block */
          break;
        case 1:                         /* fixed */
          Tracev((stderr, "inflate:     fixed codes block%s\n",
                 s->last ? " (last)" : ""));
          {
            uInt bl, bd;
            inflate_huft *tl, *td;

            inflate_trees_fixed(&bl, &bd, &tl, &td, z);
            s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
            if (s->sub.decode.codes == Z_NULL)
            {
              r = Z_MEM_ERROR;
              LEAVE
            }
          }
          DUMPBITS(3)
          s->mode = CODES;
          break;
        case 2:                         /* dynamic */
          Tracev((stderr, "inflate:     dynamic codes block%s\n",
                 s->last ? " (last)" : ""));
          DUMPBITS(3)
          s->mode = TABLE;
          break;
        case 3:                         /* illegal */
          DUMPBITS(3)
          s->mode = BAD;
          z->msg = (char*)"invalid block type";
          r = Z_DATA_ERROR;
          LEAVE
      }
      break;
    case LENS:
      NEEDBITS(32)
      if ((((~b) >> 16) & 0xffff) != (b & 0xffff))
      {
        s->mode = BAD;
        z->msg = (char*)"invalid stored block lengths";
        r = Z_DATA_ERROR;
        LEAVE
      }
      s->sub.left = (uInt)b & 0xffff;
      b = k = 0;                      /* dump bits */
      Tracev((stderr, "inflate:       stored length %u\n", s->sub.left));
      s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE);
      break;
    case STORED:
      if (n == 0)
        LEAVE
      NEEDOUT
      t = s->sub.left;
      if (t > n) t = n;
      if (t > m) t = m;
      zmemcpy(q, p, t);
      p += t;  n -= t;
      q += t;  m -= t;
      if ((s->sub.left -= t) != 0)
        break;
      Tracev((stderr, "inflate:       stored end, %lu total out\n",
              z->total_out + (q >= s->read ? q - s->read :
              (s->end - s->read) + (q - s->window))));
      s->mode = s->last ? DRY : TYPE;
      break;
    case TABLE:
      NEEDBITS(14)
      s->sub.trees.table = t = (uInt)b & 0x3fff;
#ifndef PKZIP_BUG_WORKAROUND
      if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
      {
        s->mode = BAD;
        z->msg = (char*)"too many length or distance symbols";
        r = Z_DATA_ERROR;
        LEAVE
      }
#endif
      t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
      if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
      {
        r = Z_MEM_ERROR;
        LEAVE
      }
      DUMPBITS(14)
      s->sub.trees.index = 0;
      Tracev((stderr, "inflate:       table sizes ok\n"));
      s->mode = BTREE;
    case BTREE:
      while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
      {
        NEEDBITS(3)
        s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;
        DUMPBITS(3)
      }
      while (s->sub.trees.index < 19)
        s->sub.trees.blens[border[s->sub.trees.index++]] = 0;
      s->sub.trees.bb = 7;
      t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,
                             &s->sub.trees.tb, s->hufts, z);
      if (t != Z_OK)
      {
        r = t;
        if (r == Z_DATA_ERROR)
        {
          ZFREE(z, s->sub.trees.blens);
          s->mode = BAD;
        }
        LEAVE
      }
      s->sub.trees.index = 0;
      Tracev((stderr, "inflate:       bits tree ok\n"));
      s->mode = DTREE;
    case DTREE:
      while (t = s->sub.trees.table,
             s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
      {
        inflate_huft *h;
        uInt i, j, c;

        t = s->sub.trees.bb;
        NEEDBITS(t)
        h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);
        t = h->bits;
        c = h->base;
        if (c < 16)
        {
          DUMPBITS(t)
          s->sub.trees.blens[s->sub.trees.index++] = c;
        }
        else /* c == 16..18 */
        {
          i = c == 18 ? 7 : c - 14;
          j = c == 18 ? 11 : 3;
          NEEDBITS(t + i)
          DUMPBITS(t)
          j += (uInt)b & inflate_mask[i];
          DUMPBITS(i)
          i = s->sub.trees.index;
          t = s->sub.trees.table;
          if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
              (c == 16 && i < 1))
          {
            ZFREE(z, s->sub.trees.blens);
            s->mode = BAD;
            z->msg = (char*)"invalid bit length repeat";
            r = Z_DATA_ERROR;
            LEAVE
          }
          c = c == 16 ? s->sub.trees.blens[i - 1] : 0;
          do {
            s->sub.trees.blens[i++] = c;
          } while (--j);
          s->sub.trees.index = i;
        }
      }
      s->sub.trees.tb = Z_NULL;
      {
        uInt bl, bd;
        inflate_huft *tl, *td;
        inflate_codes_statef *c;

        bl = 9;         /* must be <= 9 for lookahead assumptions */
        bd = 6;         /* must be <= 9 for lookahead assumptions */
        t = s->sub.trees.table;
        t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
                                  s->sub.trees.blens, &bl, &bd, &tl, &td,
                                  s->hufts, z);
        if (t != Z_OK)
        {
          if (t == (uInt)Z_DATA_ERROR)
          {
            ZFREE(z, s->sub.trees.blens);
            s->mode = BAD;
          }
          r = t;
          LEAVE
        }
        Tracev((stderr, "inflate:       trees ok\n"));
        if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
        {
          r = Z_MEM_ERROR;
          LEAVE
        }
        s->sub.decode.codes = c;
      }
      ZFREE(z, s->sub.trees.blens);
      s->mode = CODES;
    case CODES:
      UPDATE
      if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
        return inflate_flush(s, z, r);
      r = Z_OK;
      inflate_codes_free(s->sub.decode.codes, z);
      LOAD
      Tracev((stderr, "inflate:       codes end, %lu total out\n",
              z->total_out + (q >= s->read ? q - s->read :
              (s->end - s->read) + (q - s->window))));
      if (!s->last)
      {
        s->mode = TYPE;
        break;
      }
      s->mode = DRY;
    case DRY:
      FLUSH
      if (s->read != s->write)
        LEAVE
      s->mode = DONE;
    case DONE:
      r = Z_STREAM_END;
      LEAVE
    case BAD:
      r = Z_DATA_ERROR;
      LEAVE
    default:
      r = Z_STREAM_ERROR;
      LEAVE
  }
}


int inflate_blocks_free(s, z)
inflate_blocks_statef *s;
z_streamp z;
{
  inflate_blocks_reset(s, z, Z_NULL);
  ZFREE(z, s->window);
  ZFREE(z, s->hufts);
  ZFREE(z, s);
  Tracev((stderr, "inflate:   blocks freed\n"));
  return Z_OK;
}


void inflate_set_dictionary(s, d, n)
inflate_blocks_statef *s;
const Bytef *d;
uInt  n;
{
  zmemcpy(s->window, d, n);
  s->read = s->write = s->window + n;
}


/* Returns true if inflate is currently at the end of a block generated
 * by Z_SYNC_FLUSH or Z_FULL_FLUSH. 
 * IN assertion: s != Z_NULL
 */
int inflate_blocks_sync_point(s)
inflate_blocks_statef *s;
{
  return s->mode == LENS;
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线观看欧美| 欧美日韩成人综合在线一区二区| 日日摸夜夜添夜夜添国产精品| 中文字幕中文字幕一区二区| 国产调教视频一区| 精品国产凹凸成av人网站| 欧美一区二视频| 日韩午夜精品电影| 欧美大片在线观看| 久久久精品综合| 国产欧美日韩卡一| 国产精品乱码妇女bbbb| 综合色天天鬼久久鬼色| 亚洲欧美乱综合| 亚洲一区成人在线| 午夜日韩在线电影| 蜜臀久久99精品久久久久宅男| 日本一道高清亚洲日美韩| 日本不卡的三区四区五区| 久久精品久久精品| 国产成人综合在线观看| av成人免费在线| 在线观看欧美黄色| 7777精品伊人久久久大香线蕉完整版 | 成人小视频免费观看| 日韩成人一区二区三区在线观看| 亚洲日本在线视频观看| 久久久久久久免费视频了| 日韩欧美国产wwwww| 制服视频三区第一页精品| 在线观看视频一区二区欧美日韩| 99久精品国产| 99久久久久久| 成人aaaa免费全部观看| 丰满放荡岳乱妇91ww| 国产精品一区二区91| 国产一区二区网址| 精品一区二区三区免费| 麻豆国产欧美一区二区三区| 日韩电影在线一区二区三区| 午夜a成v人精品| 日日夜夜免费精品| 蜜臀av一级做a爰片久久| 日本不卡一区二区| 久久精品国产网站| 国产毛片精品国产一区二区三区| 国产一区二区三区黄视频 | 韩国精品主播一区二区在线观看 | 亚洲一级不卡视频| 亚洲第一综合色| 午夜国产精品影院在线观看| 丝袜亚洲精品中文字幕一区| 日韩精品欧美成人高清一区二区| 三级欧美在线一区| 久久国产欧美日韩精品| 精品一区二区在线免费观看| 国产精品一区在线| www.亚洲国产| 欧美专区日韩专区| 538在线一区二区精品国产| 日韩欧美二区三区| 国产农村妇女毛片精品久久麻豆| 国产精品热久久久久夜色精品三区 | 亚洲激情欧美激情| 一区二区欧美精品| 免费在线观看日韩欧美| 国产精品伊人色| 色婷婷综合久色| 91精品一区二区三区久久久久久 | 性做久久久久久久久| 美女尤物国产一区| 成人免费视频播放| 欧美无乱码久久久免费午夜一区 | 欧美大片免费久久精品三p| 久久久精品国产99久久精品芒果| 中文字幕av一区 二区| 一区二区三区丝袜| 看片的网站亚洲| kk眼镜猥琐国模调教系列一区二区| 在线视频一区二区免费| 日韩一区二区三区在线观看| 日本一区二区电影| 婷婷久久综合九色综合伊人色| 狠狠色综合色综合网络| 91免费视频大全| 欧美tickling网站挠脚心| 中文字幕中文字幕在线一区| 琪琪久久久久日韩精品| 成人性生交大合| 欧美一卡2卡3卡4卡| 中文字幕一区在线观看| 美女在线视频一区| 在线欧美日韩精品| 久久精品人人做人人爽人人| 亚洲香蕉伊在人在线观| 国产成人a级片| 91精品一区二区三区久久久久久 | 欧美精品 日韩| 国产精品色婷婷| 免费xxxx性欧美18vr| 91免费看片在线观看| 2欧美一区二区三区在线观看视频| 一区二区三区在线不卡| 国产精品88av| 日韩视频免费观看高清完整版 | 精品国产乱码久久久久久夜甘婷婷| 亚洲欧洲一区二区在线播放| 久久99国产精品久久99| 在线一区二区三区四区五区| 中文字幕精品一区二区精品绿巨人 | 国产欧美日韩卡一| 精品一区二区三区蜜桃| 欧美日韩一区二区不卡| 亚洲裸体xxx| a美女胸又www黄视频久久| 精品国产自在久精品国产| 日韩电影免费一区| 在线播放国产精品二区一二区四区| |精品福利一区二区三区| 国产一区二区久久| 精品少妇一区二区三区在线播放| 亚洲一区二区影院| 一本大道久久a久久综合婷婷| 中文字幕精品综合| 国产精品亚洲一区二区三区妖精| 欧美一区二区三区在线观看| 亚洲高清在线视频| 欧美中文字幕一区| 亚洲综合视频在线观看| 一本到高清视频免费精品| 中文字幕一区在线| 成人亚洲一区二区一| 2014亚洲片线观看视频免费| 久久99这里只有精品| 日韩精品自拍偷拍| 看国产成人h片视频| 91国偷自产一区二区三区观看| 亚洲第一主播视频| 国产亚洲欧美色| 91视频在线看| 免费高清成人在线| 欧美国产视频在线| 91福利视频网站| 另类小说欧美激情| 福利91精品一区二区三区| 国产欧美综合色| 成人丝袜高跟foot| 亚洲欧洲日产国产综合网| 91网上在线视频| 亚洲一区二区视频| 7777精品伊人久久久大香线蕉 | 色综合视频一区二区三区高清| 成人欧美一区二区三区1314 | 国产亚洲精品久| 国产91富婆露脸刺激对白| 国产精品嫩草久久久久| proumb性欧美在线观看| 亚洲女子a中天字幕| 日韩精品午夜视频| 精品国产乱码久久久久久牛牛| 色婷婷精品大视频在线蜜桃视频| 久久精品国产久精国产| 亚洲精品亚洲人成人网 | 日韩av在线发布| www成人在线观看| zzijzzij亚洲日本少妇熟睡| 一区二区欧美精品| 精品久久人人做人人爰| 不卡一卡二卡三乱码免费网站| 亚洲在线视频网站| 精品国产一区二区三区四区四| jlzzjlzz亚洲日本少妇| 性感美女久久精品| 国产亚洲一区二区三区四区| 91福利在线看| 国产精品系列在线播放| 一区二区日韩电影| 久久精品男人天堂av| 在线日韩国产精品| 国产精品一卡二| 亚洲一区在线观看网站| 欧美精品一区二区三| 99久久久国产精品免费蜜臀| 日韩中文欧美在线| 国产精品盗摄一区二区三区| 91精品国产品国语在线不卡| 风间由美一区二区三区在线观看| 无吗不卡中文字幕| 中文字幕在线不卡| 久久综合网色—综合色88| 欧美日韩精品一区二区在线播放 | 91精彩视频在线| 国产精品91xxx| 免费成人小视频| 亚洲一区二区三区在线| 欧美国产日韩a欧美在线观看| 欧美日本乱大交xxxxx| 波多野结衣中文字幕一区| 麻豆一区二区99久久久久| 一区二区日韩av|