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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lzw.cpp

?? linux下的一款播放器
?? CPP
字號:
/* ***** BEGIN LICENSE BLOCK ***** * Source last modified: $Id: lzw.cpp,v 1.2.24.1 2004/07/09 01:54:29 hubbe Exp $ *  * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. *  * The contents of this file, and the files included with this file, * are subject to the current version of the RealNetworks Public * Source License (the "RPSL") available at * http://www.helixcommunity.org/content/rpsl unless you have licensed * the file under the current version of the RealNetworks Community * Source License (the "RCSL") available at * http://www.helixcommunity.org/content/rcsl, in which case the RCSL * will apply. You may also obtain the license terms directly from * RealNetworks.  You may not use this file except in compliance with * the RPSL or, if you have a valid RCSL with RealNetworks applicable * to this file, the RCSL.  Please see the applicable RPSL or RCSL for * the rights, obligations and limitations governing use of the * contents of the file. *  * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License Version 2 or later (the * "GPL") in which case the provisions of the GPL are applicable * instead of those above. If you wish to allow use of your version of * this file only under the terms of the GPL, and not to allow others * to use your version of this file under the terms of either the RPSL * or RCSL, indicate your decision by deleting the provisions above * and replace them with the notice and other provisions required by * the GPL. If you do not delete the provisions above, a recipient may * use your version of this file under the terms of any one of the * RPSL, the RCSL or the GPL. *  * This file is part of the Helix DNA Technology. RealNetworks is the * developer of the Original Code and owns the copyrights in the * portions it created. *  * This file, and the files included with this file, is distributed * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET * ENJOYMENT OR NON-INFRINGEMENT. *  * Technology Compatibility Kit Test Suite(s) Location: *    http://www.helixcommunity.org/content/tck *  * Contributor(s): *  * ***** END LICENSE BLOCK ***** */#include <hlxclib/memory.h>#include <string.h>#include "lzw.h"#include "hxheap.h"#ifdef _DEBUG#undef HX_THIS_FILE		static char HX_THIS_FILE[] = __FILE__;#endifLZWCodec::LZWCodec(){    /* Initialize all member variables */    m_bFresh                   = TRUE;    m_bPostClearCode           = FALSE;    m_lCodeSize                = 0;    m_lSetCodeSize             = 0;    m_lMaxCode                 = 0;    m_lMaxCodeSize             = 0;    m_lFirstCode               = 0;    m_lOldCode                 = 0;    m_lClearCode               = 0;    m_lEndCode                 = 0;    m_pCurByte                 = NULL;    m_lCurBit                  = 0;    m_lBytesInBuffer           = -1;    m_bFinished                = FALSE;    m_bSuspended               = TRUE;    m_bAllCompressedDataCopied = FALSE;    m_pCompressedBuffer        = NULL;    m_lCompressedBufferSize    = 0;    m_lCompressedBytesCopied   = 0;    /* Clear the tables */    ClearTables();    /* Reset the stack */    m_plStackPtr = m_lStack;};LZWCodec::~LZWCodec(){    if (m_pCompressedBuffer)    {        delete [] m_pCompressedBuffer;        m_pCompressedBuffer = NULL;    }};HX_RESULT LZWCodec::SetCompressedBufferSize(INT32 lSize){    /* Check for input error conditions */    if (lSize < 1)    {        return HXR_INVALID_PARAMETER;    }    /* Allocate space for the compressed buffer */    if (m_pCompressedBuffer)    {        delete [] m_pCompressedBuffer;        m_pCompressedBuffer = NULL;    }    m_pCompressedBuffer = new BYTE [lSize];    if (!m_pCompressedBuffer)    {        return HXR_OUTOFMEMORY;    }    /* Set the size */    m_lCompressedBufferSize  = lSize;    m_lCompressedBytesCopied = 0;    /* Initialize the state variables */    m_pCurByte                 = m_pCompressedBuffer;    m_lBytesInBuffer           = -1;    m_bAllCompressedDataCopied = FALSE;    m_bSuspended               = TRUE;    return HXR_OK;}HX_RESULT LZWCodec::InitDecompress(INT32 lMinCodeBits){    /* Check for input error conditions */    if (lMinCodeBits < 1 || lMinCodeBits >  kMaxLZWBits)    {        return HXR_INVALID_PARAMETER;    }    /* Set up code size parameters */    m_lSetCodeSize = lMinCodeBits;    m_lCodeSize    = m_lSetCodeSize + 1;    m_lClearCode   = 1 << m_lSetCodeSize;    m_lEndCode     = m_lClearCode + 1;    m_lMaxCodeSize = m_lClearCode << 1;    m_lMaxCode     = m_lClearCode + 2;    /* This says to look for clear codes */    m_bFresh = TRUE;    /* Clear out all table entries */    ClearTables();    /* Reset the stack pointer */    m_plStackPtr = m_lStack;    return HXR_OK;}HX_RESULT LZWCodec::AppendCompressedBuffer(BYTE *pBuffer, INT32 lBufLen){    /* Check for input error conditions */    if (pBuffer == NULL || lBufLen < 1)    {        return HXR_INVALID_PARAMETER;    }    /* Make sure we're not called after we should be */    if (m_bAllCompressedDataCopied == TRUE)    {        return HXR_OK;    }    /* Make sure we don't copy off the end of the buffer */    INT32 lBytesToCopy;    if (m_lCompressedBytesCopied + lBufLen <= m_lCompressedBufferSize)    {        lBytesToCopy = lBufLen;    }    else    {        lBytesToCopy = m_lCompressedBufferSize - m_lCompressedBytesCopied;    }    /* Do the copy */    memcpy(&m_pCompressedBuffer[m_lCompressedBytesCopied], pBuffer, lBytesToCopy); /* Flawfinder: ignore */    /* Update the member variables */    m_lCompressedBytesCopied += lBufLen;    m_lBytesInBuffer         += lBufLen;    m_bSuspended              = FALSE;    /* Check if we've received all data */    if (m_lCompressedBytesCopied >= m_lCompressedBufferSize)    {        m_bAllCompressedDataCopied = TRUE;    }    return HXR_OK;}HX_RESULT LZWCodec::LZWReadByte(INT32 &rlSymbol){    /* Are we still suspended? */    if (m_bSuspended == TRUE)    {        rlSymbol = -1;        return HXR_OK;    }    INT32 lCode;    /* If this flag is set, it means skip all clear codes at the current point */    if (m_bFresh == TRUE)    {        do        {            lCode = GetCode();            if (lCode < 0)            {                rlSymbol     = -1;                m_bSuspended = TRUE;                return HXR_OK;            }            m_lFirstCode = m_lOldCode = lCode;        }        while (m_lFirstCode == m_lClearCode);        m_bFresh = FALSE;        rlSymbol = m_lFirstCode;        return HXR_OK;    }    /* If we're currently copying off the stack, then return the stack values */    if (m_plStackPtr > m_lStack)    {        rlSymbol = *--m_plStackPtr;        return HXR_OK;    }    /* Read values until we're done or we suspend */    while (1)    {        /* Get a code */        lCode = GetCode();        if (lCode < 0)        {            rlSymbol     = -1;            m_bSuspended = TRUE;            return HXR_OK;        }        /* Is this a code just after a clear code? */        if (m_bPostClearCode == TRUE)        {            m_bPostClearCode = FALSE;            m_lFirstCode     = m_lOldCode = rlSymbol = lCode;            return HXR_OK;        }        /* We got a valid code, so now take action based on that code */        if (lCode == m_lClearCode)        {            /* We got a clear code, so we clear the tables and reset everything */            ClearTables();            m_lCodeSize    = m_lSetCodeSize + 1;            m_lMaxCodeSize = m_lClearCode << 1;            m_lMaxCode     = m_lClearCode + 2;            m_plStackPtr   = m_lStack;            /* Set the flag which says we just got a clear code */            m_bPostClearCode = TRUE;        }        else if (lCode == m_lEndCode)        {            rlSymbol     = lCode;            m_bFinished  = TRUE;            m_bSuspended = FALSE;            return HXR_OK;        }        else        {            INT32 lInCode = lCode;            if (lCode >= m_lMaxCode)            {                *m_plStackPtr++ = m_lFirstCode;                lCode           = m_lOldCode;            }            INT32* pStackLimit = &m_lStack[0] + (kMaxLZWVal << 1);            while (lCode >= m_lClearCode)            {                if (m_plStackPtr >= pStackLimit)                {                    // We've blown our code stack, so we have a corrupt                    // GIF image. In this case, we need to error out.                    return HXR_FAIL;                }                *m_plStackPtr++ = m_lTable[1][lCode];                if (lCode == m_lTable[0][lCode])                {                    /* Tables have a circular reference in them - corrupt file */                    return HXR_FAILED;                }                lCode = m_lTable[0][lCode];            }            *m_plStackPtr++ = m_lFirstCode = m_lTable[1][lCode];            lCode = m_lMaxCode;            if (lCode < kMaxLZWVal)            {                m_lTable[0][lCode] = m_lOldCode;                m_lTable[1][lCode] = m_lFirstCode;                m_lMaxCode++;                if (m_lMaxCode     >= m_lMaxCodeSize &&                    m_lMaxCodeSize <  kMaxLZWVal)                {                    m_lMaxCodeSize <<= 1;                    m_lCodeSize++;                }            }            m_lOldCode = lInCode;            if (m_plStackPtr > m_lStack)            {                rlSymbol = *--m_plStackPtr;                return HXR_OK;            }        }    }    rlSymbol = 0;    return HXR_OK;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老鸭窝一区二区久久精品| 精品国产99国产精品| 久久99久久久久| 综合色中文字幕| 久久久久久一二三区| 7777精品伊人久久久大香线蕉完整版 | 久久se精品一区二区| 亚洲在线视频免费观看| 国产精品视频线看| 精品国产髙清在线看国产毛片| 欧美综合一区二区| va亚洲va日韩不卡在线观看| 激情成人综合网| 免费高清在线视频一区·| 亚洲一区二区四区蜜桃| 中文字幕av一区 二区| 国产欧美一区二区三区鸳鸯浴 | www.视频一区| 成人av在线网站| 国产99久久精品| av亚洲精华国产精华精华 | 国产亚洲欧美日韩日本| 色婷婷精品久久二区二区蜜臂av | 蜜桃一区二区三区四区| 亚洲最新视频在线播放| 亚洲国产视频直播| 亚洲大片免费看| 免费成人av资源网| 国产精品99久久久久久有的能看| 国产精品1024| 91免费版在线看| 777xxx欧美| 久久精品综合网| 亚洲免费av高清| 日韩精品一区第一页| 美日韩黄色大片| av电影天堂一区二区在线观看| av电影在线不卡| 日韩欧美一二三四区| 中文字幕第一区综合| 亚洲国产裸拍裸体视频在线观看乱了 | 五月开心婷婷久久| 国产精品系列在线观看| 欧美色综合久久| 国产无人区一区二区三区| 亚洲一区二区三区精品在线| 视频一区视频二区在线观看| 国产精品456| 欧美精品黑人性xxxx| 国产精品三级电影| 青娱乐精品在线视频| 91女神在线视频| 久久嫩草精品久久久精品一| 亚洲国产另类精品专区| www.爱久久.com| 精品黑人一区二区三区久久 | 久久久久久久国产精品影院| 亚洲综合偷拍欧美一区色| 大桥未久av一区二区三区中文| 91精品午夜视频| 一区二区三区四区在线| 成人午夜大片免费观看| 欧美不卡一区二区三区四区| 亚洲成a人片在线不卡一二三区| 国产成人免费网站| 久久久.com| 国产精品一品视频| 国产校园另类小说区| 国内成人免费视频| 久久久久久电影| 国产精品中文字幕欧美| 欧美精品一区二区三区在线播放 | 麻豆一区二区三区| 欧美一区二区三区电影| 日本三级韩国三级欧美三级| 欧美精品aⅴ在线视频| 一区二区免费视频| 欧美肥妇bbw| 韩国女主播成人在线| 精品999久久久| www.欧美.com| 性欧美大战久久久久久久久| 欧美日免费三级在线| 免费成人av在线| 国产精品久久久久三级| 91福利视频在线| 韩国v欧美v亚洲v日本v| 国产精品视频在线看| 色噜噜夜夜夜综合网| 日韩电影在线观看网站| 久久久久97国产精华液好用吗| 北条麻妃国产九九精品视频| 亚洲国产精品人人做人人爽| 日韩免费观看高清完整版在线观看| 黄色小说综合网站| 亚洲免费看黄网站| 久久精品人人爽人人爽| 欧美亚洲综合另类| 国产一区不卡精品| 五月综合激情日本mⅴ| 国产精品乱人伦| 91精品国产高清一区二区三区 | 久久99国内精品| 亚洲影院在线观看| 国产精品久久久久久久岛一牛影视| 欧美在线播放高清精品| 成人高清在线视频| 国产一区二区三区综合| 日本在线播放一区二区三区| 中文字幕在线观看一区| 久久嫩草精品久久久久| 欧美一区二区三区的| 欧美日韩日日骚| 色婷婷综合久久久| 99精品视频一区| av一区二区三区在线| 久久91精品久久久久久秒播| 视频一区二区欧美| 亚洲成av人片在www色猫咪| 一区二区三区四区国产精品| 国产精品乱人伦中文| 国产精品盗摄一区二区三区| 精品欧美一区二区在线观看| 日韩欧美美女一区二区三区| 日韩一二三四区| 精品免费国产一区二区三区四区| 91精品国产91综合久久蜜臀| 欧美日韩国产另类一区| 欧美高清视频不卡网| 欧美一区二区三区婷婷月色| 欧美一二三区在线观看| 91精品国产品国语在线不卡| 日韩精品综合一本久道在线视频| 精品日韩在线观看| 国产精品天美传媒| 亚洲女人小视频在线观看| 亚洲国产综合在线| 麻豆精品在线观看| 97久久超碰国产精品电影| 在线看日韩精品电影| 日韩亚洲欧美中文三级| 久久久久久久综合狠狠综合| 日本一二三不卡| 首页亚洲欧美制服丝腿| 国产福利一区二区| 91一区二区三区在线播放| 欧美日韩三级在线| 中文字幕欧美区| 青青草成人在线观看| 成人免费看视频| 日韩视频免费直播| 亚洲人成网站色在线观看| 日本强好片久久久久久aaa| 不卡一区二区三区四区| 欧美一区二区三区在线观看| 国产精品午夜免费| 久久狠狠亚洲综合| 欧美性感一区二区三区| 国产欧美一区二区在线观看| 天堂va蜜桃一区二区三区| 不卡av电影在线播放| 欧美成人艳星乳罩| 蜜臀久久久久久久| 欧美色男人天堂| 亚洲人成亚洲人成在线观看图片| 国产麻豆成人传媒免费观看| 欧美一级理论性理论a| 亚洲一二三四在线| 91福利国产成人精品照片| 中文字幕av一区二区三区免费看| 久久99精品久久只有精品| 91精品国产高清一区二区三区| 亚洲国产一区二区三区| 欧美日韩国产在线观看| 亚洲一区二区三区四区在线免费观看| 91免费版pro下载短视频| 亚洲精选视频在线| 色爱区综合激月婷婷| 一卡二卡三卡日韩欧美| 91福利视频久久久久| 亚洲成av人片在线| 精品理论电影在线观看| 国产成人免费在线视频| 中文成人av在线| 在线精品亚洲一区二区不卡| 午夜欧美在线一二页| 777午夜精品视频在线播放| 国产乱理伦片在线观看夜一区| 中文字幕在线观看不卡| a4yy欧美一区二区三区| 国产欧美久久久精品影院| 国产乱人伦精品一区二区在线观看| 欧美精品视频www在线观看| 亚洲欧美日韩人成在线播放| 成人一区二区三区中文字幕| 国产欧美日韩激情| 97精品超碰一区二区三区| 久久久91精品国产一区二区三区| 国产在线精品免费av| 中文字幕制服丝袜一区二区三区|