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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? lzss.c

?? 一個(gè)加密庫(kù)代碼
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):

  // no, restore the local variables...
  blDone = pCtx->blSaveDone;
  nI = pCtx->nSaveI;
  nC = pCtx->nSaveC;
  nLen = pCtx->nSaveLen;
  nR = pCtx->nSaveR;
  nS = pCtx->nSaveS;
  nLastMatchLength = pCtx->nSaveLastMatchLength;
  nCodeBufPtr = pCtx->nSaveCodeBufPtr;
  bMask = pCtx->bSaveMask;
  memcpy(code_buf, pCtx->saveCode_buf, 17);
  
  // ...and jump to the last interruption point
  switch (pCtx->wInterruptPoint) {
    case 2 : goto ENTRYPOINT2;
    case 3 : goto ENTRYPOINT3;
  }

  // here we start with the engine setup
ENTRYPOINT1:
  initTree(pCtx);  // initialize trees
  code_buf[0] = 0;  // code_buf[1..16] saves eight units of code, and
                    // code_buf[0] works as eight flags, "1" representing that
                    // the unit is an unencoded letter (1 byte), "0" a position
                    // -and-length pair (2 bytes).  Thus, eight units require at
                    // most 16 bytes of code.
  nCodeBufPtr = bMask =1;
  nS = 0;
  nR = LZSS_N - LZSS_F;
  
  // clear the buffer with any character that might appear often (SPACE)
  for (nI = nS; nI < nR; nI++) pCtx->text_buf[nI] = ' ';
  nLen = 0;
  blDone = BOOL_FALSE;
  
  while (blDone == BOOL_FALSE) 
  {
    // the following entry point will guarantee, that the readByte() call will
    // be repeated when the engine is re-activated, same technique used below
ENTRYPOINT2:
    wTemp = readByte(pCtx);
    // must we interrupt the engine?
    if (wTemp == LZSS_EOB) 
    {
      COMPRESS_SAVE_LOCAL_VAR
      pCtx->wInterruptPoint = 2;
      // return the number of bytes written (will be zero here)
      return pCtx->lBytesWritten;
    }

    // has the stream come to its end?
    if (wTemp == LZSS_EOD) blDone = BOOL_TRUE;
    else 
    {
      // read LZSS_F bytes into the last LZSS_F bytes of the buffer
      pCtx->text_buf[nR + nLen] = (WORD8) wTemp; 
      if (++nLen >= LZSS_F) blDone = BOOL_TRUE;
    }
  }

  // nothing to compress at all?
  if (nLen == 0) return 0;

  // Insert the LZSS_F strings, each of which begins with one or more 'space'
  // characters. Note the order in which these strings are inserted. This way,
  // degenerated trees will be less likely to occur.
  for (nI = 1; nI <= LZSS_F; nI++) insertNode(pCtx, nR - nI); 

  // Finally, insert the whole string just read. The context variables
  // nMatchLength and nMatchPosition are set.
  insertNode(pCtx, nR);

  do 
  {
    // match_length may be spuriously long near the end of text.
    if (pCtx->nMatchLength > nLen) pCtx->nMatchLength = nLen;

    if (pCtx->nMatchLength <= LZSS_THRESHOLD) 
    {
      pCtx->nMatchLength = 1;  // not long enough match, send one byte
      code_buf[0] |= bMask;  // "send one byte" flag
      code_buf[nCodeBufPtr++] = pCtx->text_buf[nR];  // send uncoded
    }
    else 
    {
      code_buf[nCodeBufPtr++] = (WORD8) pCtx->nMatchPosition;

      // send position and length pair, note nMatchLength > LZSS_THRESHOLD.
      code_buf[nCodeBufPtr++] = (WORD8) (((pCtx->nMatchPosition >> 4) & 0xf0) |
                                (pCtx->nMatchLength - (LZSS_THRESHOLD + 1)));
    }
    // shift mask left one bit
    if ((bMask <<= 1) == 0) 
    {
      // send at most 8 units of code together
      for (nI = 0; nI < nCodeBufPtr; nI++) 
        cWriteByte(pCtx, code_buf[nI]);
      code_buf[0] = 0;
      nCodeBufPtr = bMask = 1;
    }
    nLastMatchLength = pCtx->nMatchLength;
    nI = 0;
    blDone = BOOL_FALSE;
    while (blDone == BOOL_FALSE) 
    {
ENTRYPOINT3:
      wTemp = readByte(pCtx);

      // must we interrupt the engine?
      if (wTemp == LZSS_EOB) 
      {
        COMPRESS_SAVE_LOCAL_VAR
        pCtx->wInterruptPoint = 3;

        // return the number of bytes written
        return pCtx->lBytesWritten;
      }
      // has the stream come to its end?
      if (wTemp == LZSS_EOD) 
        blDone = BOOL_TRUE;
      else 
      {
        nC = wTemp;

        // delete old strings and read new bytes
        deleteNode(pCtx, nS);    
        pCtx->text_buf[nS] = (WORD8) nC;

        // if the position is near the end of buffer, extend the buffer to
        // make string comparison easier
        if (nS < (LZSS_F - 1)) pCtx->text_buf[nS + LZSS_N] = (WORD8) nC;

        // since this is a ring buffer, increment the position modulo LZSS_N
        nS = (nS + 1) & (LZSS_N - 1);  
        nR = (nR + 1) & (LZSS_N - 1);  

        // register the string in text_buf[nR..nR + LZSS_F - 1]
        insertNode(pCtx, nR);   
        if (++nI >= nLastMatchLength) blDone = BOOL_TRUE;
      }
    }

    // after the end of text,no need to read, but buffer may not be empty
    while (nI++ < nLastMatchLength) 
    {
      deleteNode(pCtx, nS);                     
      nS = (nS + 1) & (LZSS_N - 1);
      nR = (nR + 1) & (LZSS_N - 1);
      if (--nLen) insertNode(pCtx, nR);
    }
  } 
  while (nLen > 0); // (until all data has been compressed)

  // send remaining code
  if (nCodeBufPtr > 1) 
    for (nI = 0; nI < nCodeBufPtr; nI++) cWriteByte(pCtx, code_buf[nI]);
  
  // remember that lCodeSize just contains the number of all compressed bytes
  return pCtx->lBytesWritten;
}



// macro to save the local variables in a context, used in LZSS_Decompress()
#define DECOMPRESS_SAVE_LOCAL_VAR pCtx->blSaveDone = blDone;    \
                                  pCtx->nSaveI = nI;            \
                                  pCtx->nSaveJ = nJ;            \
                                  pCtx->nSaveK = nK;            \
                                  pCtx->nSaveR = nR;            \
                                  pCtx->nSaveC = nC;            \
                                  pCtx->wSaveFlags = wFlags;




WORD32 CRYPTPAK_API LZSS_Decompress
  (PLZSSCTX pCtx, 
   const void* pSource, 
   void* pTarget, 
   WORD32 lNumOfBytes,
   WORD32 lSizeOfOutputBuffer, 
   WORD8 bCondition, 
   BYTEBOOL* pblRepeatMe) 
{
  BYTEBOOL blDone;
  int nI, nJ, nK, nR, nC;
  WORD16 wFlags;
  WORD16 wTemp; // (this variable mustn't be saved)

  // first set up the i/o pointers and the counters
  pCtx->pDataSource = (WORD8*) pSource;
  pCtx->pDataDrain = (WORD8*) pTarget;
  pCtx->lDrainSize = lSizeOfOutputBuffer;
  pCtx->lSourceSize = lNumOfBytes;
  if (*pblRepeatMe == BOOL_FALSE) pCtx->lBytesRead = 0;
  pCtx->lBytesWritten = 0;

  // end of data stream?
  if ((bCondition & LZSS_STOP) == LZSS_STOP) 
    pCtx->blEOD = BOOL_TRUE;
  else 
    pCtx->blEOD = BOOL_FALSE;

  // must we first launch the compression engine?
  if ((bCondition & LZSS_START) == LZSS_START)    
  {	  
	  blDone = BOOL_FALSE;
	  nJ = nK = nC = 0;
	  goto ENTRYPOINT1;
  }	

  // if not, restore the local variables...
  blDone = pCtx->blSaveDone;
  nI = pCtx->nSaveI;
  nJ = pCtx->nSaveJ;
  nK = pCtx->nSaveK;
  nR = pCtx->nSaveR;
  nC = pCtx->nSaveC;
  wFlags = pCtx->wSaveFlags;

  // ...and jump to the last interrupt point
  switch (pCtx->wInterruptPoint) 
  {
    case 2 : goto ENTRYPOINT2;
    case 3 : goto ENTRYPOINT3;
    case 4 : goto ENTRYPOINT4;
    case 5 : goto ENTRYPOINT5;
    case 6 : goto ENTRYPOINT6;
    case 7 : goto ENTRYPOINT7;
  }

  // here we start with the engine setup
ENTRYPOINT1:
  for (nI = 0; nI < LZSS_N - LZSS_F; nI++) 
    pCtx->text_buf[nI] = ' ';
  nR = LZSS_N - LZSS_F;
  wFlags = 0;
  for (;;)
  {
    if (((wFlags >>= 1) & 256) == 0) 
    {
ENTRYPOINT2:
      wTemp = readByte(pCtx);
      // must we interrupt the engine?
      if (wTemp == LZSS_EOB) 
      {
        DECOMPRESS_SAVE_LOCAL_VAR
        pCtx->wInterruptPoint = 2;
        *pblRepeatMe = BOOL_FALSE;
        return pCtx->lBytesWritten;
      }
      // has the stream come to its end?
      if (wTemp == LZSS_EOD) 
      {
        // yes, everything's finished now
        *pblRepeatMe = BOOL_FALSE;
        return pCtx->lBytesWritten;
      }
      nC = wTemp;
      wFlags = (WORD16) (nC | 0xff00); // uses higher byte cleverly to count 8
    }
    if (wFlags & 1) 
    {
ENTRYPOINT3:
      wTemp = readByte(pCtx);
      // (same input technique as above)
      if (wTemp == LZSS_EOB) 
      {
        DECOMPRESS_SAVE_LOCAL_VAR
        pCtx->wInterruptPoint = 3;
        *pblRepeatMe = BOOL_FALSE;
        return pCtx->lBytesWritten;
      }
      if (wTemp == LZSS_EOD) 
      {
        *pblRepeatMe = BOOL_FALSE;
        return pCtx->lBytesWritten;
      }
      nC = wTemp;
      // can we put out a byte?
ENTRYPOINT4:
      if (dWriteByte(pCtx, (WORD8) nC) == BOOL_FALSE) 
      {
        // no -> set the repeat flag and interrupt the routine
        DECOMPRESS_SAVE_LOCAL_VAR
        pCtx->wInterruptPoint = 4;
        *pblRepeatMe = BOOL_TRUE;
        return pCtx->lBytesWritten;
      }
      pCtx->text_buf[nR++] = (WORD8) nC;
      nR &= (LZSS_N - 1);
    }
    else 
    {
      // (same input techniques as above)
ENTRYPOINT5:
      wTemp = readByte(pCtx);
      if (wTemp == LZSS_EOB) 
      {
        DECOMPRESS_SAVE_LOCAL_VAR
        pCtx->wInterruptPoint = 5;
        *pblRepeatMe = BOOL_FALSE;
        return pCtx->lBytesWritten;
      }
      if (wTemp == LZSS_EOD) 
      {
        *pblRepeatMe = BOOL_FALSE;
        return pCtx->lBytesWritten;
      }
      nI = wTemp;
ENTRYPOINT6:
      wTemp = readByte(pCtx);
      if (wTemp == LZSS_EOB) 
      {
        DECOMPRESS_SAVE_LOCAL_VAR
        pCtx->wInterruptPoint = 6;
        *pblRepeatMe = BOOL_FALSE;
        return pCtx->lBytesWritten;
      } 
      if (wTemp == LZSS_EOD) 
      {
        *pblRepeatMe = BOOL_FALSE;
        return pCtx->lBytesWritten;
      }
      nJ = wTemp;
      nI |= ((nJ & 0xf0) << 4);
      nJ = (nJ & 0x0f) + LZSS_THRESHOLD;
      nK = 0;
      while (nK <= nJ) 
      {
        nC = pCtx->text_buf[(nI + nK) & (LZSS_N - 1)];
ENTRYPOINT7:
        // (same output technique as above)
        if (dWriteByte(pCtx, (WORD8) nC) == BOOL_FALSE) 
        {
          DECOMPRESS_SAVE_LOCAL_VAR
          pCtx->wInterruptPoint = 7;
          *pblRepeatMe = BOOL_TRUE;
          return pCtx->lBytesWritten;
        } 
        pCtx->text_buf[nR++] = (WORD8) nC;
        nR &= (LZSS_N - 1);
        nK++;
      }
    }
  } // of while()
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲影视婷婷| 美女在线一区二区| 国产精品久久久久久久久果冻传媒 | 一区二区三区日本| 国产精品网站在线播放| 久久美女艺术照精彩视频福利播放| 欧美人动与zoxxxx乱| 欧美亚洲另类激情小说| 91久久一区二区| 欧美日韩小视频| 91精品在线观看入口| 日韩视频一区二区| 欧美成人猛片aaaaaaa| 欧美精品一区二区三区一线天视频| 精品国产3级a| 国产精品污网站| 伊人婷婷欧美激情| 日韩电影在线观看电影| 蜜臀久久99精品久久久久久9 | 欧美日韩视频在线第一区| 欧美日韩高清一区二区不卡| 欧美欧美欧美欧美| 日韩三区在线观看| 国产欧美精品国产国产专区 | av在线不卡免费看| 色综合中文字幕国产| 成人开心网精品视频| 91猫先生在线| 欧美一区二区三区在线| 久久欧美中文字幕| 中文字幕在线观看一区二区| 亚洲精品成人精品456| 午夜天堂影视香蕉久久| 狠狠狠色丁香婷婷综合激情| 成人美女视频在线看| 欧美网站一区二区| 精品久久五月天| 日韩一区有码在线| 丝袜a∨在线一区二区三区不卡| 美国毛片一区二区三区| 成人黄色av电影| 777奇米四色成人影色区| ww亚洲ww在线观看国产| 最好看的中文字幕久久| 五月激情综合色| 国产精品综合视频| 在线观看日韩国产| 精品久久人人做人人爰| 亚洲欧美日韩国产另类专区| 麻豆视频观看网址久久| 92国产精品观看| 欧美一区二区三区免费| 国产精品美女久久久久av爽李琼| 亚洲一区二区三区视频在线播放 | 欧美日韩1234| 久久久久久麻豆| 一区二区三区色| 久久99精品网久久| 欧洲国产伦久久久久久久| 精品成人私密视频| 亚洲国产视频网站| 成人短视频下载| 91精品国产91久久久久久一区二区 | 日韩精品专区在线| 亚洲免费毛片网站| 国内精品写真在线观看| 日本韩国精品在线| 国产亚洲婷婷免费| 日韩精品乱码免费| 91亚洲男人天堂| 久久久久97国产精华液好用吗| 亚洲一区二区影院| 成人97人人超碰人人99| 欧美成人伊人久久综合网| 一区二区三区日韩精品视频| 成人午夜在线视频| 久久亚洲综合av| 美女www一区二区| 5858s免费视频成人| 亚洲另类中文字| 成人视屏免费看| 欧美精品一区二区三区蜜桃视频 | 国产高清久久久久| 欧美一级在线视频| 亚洲高清免费在线| 91色综合久久久久婷婷| 国产丝袜欧美中文另类| 精品一区二区三区香蕉蜜桃 | 欧洲精品中文字幕| 综合网在线视频| 国产mv日韩mv欧美| 欧美精品一区二区三区一线天视频| 香蕉久久夜色精品国产使用方法| 97久久人人超碰| 国产精品久久久久久久久久免费看| 国产美女主播视频一区| 欧美大片在线观看一区| 日本不卡一区二区| 91麻豆精品国产91久久久资源速度| 亚洲欧美电影院| 91丨porny丨国产入口| 国产精品剧情在线亚洲| 成人精品一区二区三区四区| 国产日韩欧美麻豆| 国产福利不卡视频| 中文字幕av一区二区三区免费看| 国产精品一品二品| 国产日本欧美一区二区| 国产成人综合精品三级| 久久五月婷婷丁香社区| 激情图区综合网| 久久久精品tv| 国产99精品国产| 国产精品伦理一区二区| 成人av动漫在线| 亚洲精品成人a在线观看| 色久综合一二码| 亚洲3atv精品一区二区三区| 717成人午夜免费福利电影| 奇米精品一区二区三区在线观看| 日韩午夜中文字幕| 国产精品88888| 国产精品欧美久久久久无广告 | 欧美一区二区视频免费观看| 久久精品99国产精品| 久久午夜羞羞影院免费观看| 成人激情图片网| 一级日本不卡的影视| 欧美日韩精品一区二区天天拍小说| 天天色综合天天| 亚洲精品在线免费观看视频| 国产精品538一区二区在线| 自拍偷拍国产亚洲| 91九色最新地址| 青青草一区二区三区| 久久精品一二三| 成人免费福利片| 亚洲影院在线观看| 日韩久久久精品| 99国产精品国产精品毛片| 亚洲一区在线电影| 久久天天做天天爱综合色| av亚洲产国偷v产偷v自拍| 亚洲国产欧美在线人成| 久久综合九色综合97婷婷| 97超碰欧美中文字幕| 视频一区二区三区在线| 国产日本亚洲高清| 欧美无人高清视频在线观看| 国产一区二区三区高清播放| 亚洲免费av高清| 精品国产乱码久久久久久久久| av毛片久久久久**hd| 麻豆国产欧美日韩综合精品二区| 中文字幕在线观看不卡视频| 欧美一级黄色片| 91色porny| 九色porny丨国产精品| 亚洲码国产岛国毛片在线| 日韩欧美中文一区| 99国产欧美久久久精品| 久久草av在线| 亚洲成人综合视频| 国产精品福利影院| 精品欧美一区二区在线观看| 一本到三区不卡视频| 国产一区二区中文字幕| 亚洲国产精品一区二区尤物区| 国产视频不卡一区| 69堂国产成人免费视频| 色哦色哦哦色天天综合| 国产福利一区二区三区视频在线| 亚洲福利一区二区| 中文字幕在线不卡视频| 久久一区二区三区四区| 欧美福利电影网| 一本色道久久综合精品竹菊| 国产一区二区福利| 日本中文字幕不卡| 一区二区高清视频在线观看| 日本一区二区久久| 欧美videossexotv100| 欧美日韩一区二区欧美激情| jizz一区二区| 丰满亚洲少妇av| 国产一区二区三区久久悠悠色av| 日韩精品每日更新| 亚洲6080在线| 亚洲一本大道在线| 一区二区三区.www| 国产精品久久国产精麻豆99网站| 26uuu精品一区二区| 欧美一区二区三区的| 欧美三片在线视频观看| 91在线观看污| 99免费精品视频| 成人动漫在线一区| 不卡一区中文字幕| 99久久99久久精品国产片果冻| 国产高清不卡二三区|