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

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

?? lz.c

?? tinyos2.0版本驅動
?? C
?? 第 1 頁 / 共 2 頁
字號:
/************************************************************************** Name:        lz.c* Author:      Marcus Geelnard* Description: LZ77 coder/decoder implementation.* Reentrant:   Yes** The LZ77 compression scheme is a substitutional compression scheme* proposed by Abraham Lempel and Jakob Ziv in 1977. It is very simple in* its design, and uses no fancy bit level compression.** This is my first attempt at an implementation of a LZ77 code/decoder.** The principle of the LZ77 compression algorithm is to store repeated* occurrences of strings as references to previous occurrences of the same* string. The point is that the reference consumes less space than the* string itself, provided that the string is long enough (in this* implementation, the string has to be at least 4 bytes long, since the* minimum coded reference is 3 bytes long). Also note that the term* "string" refers to any kind of byte sequence (it does not have to be* an ASCII string, for instance).** The coder uses a brute force approach to finding string matches in the* history buffer (or "sliding window", if you wish), which is very, very* slow. I recon the complexity is somewhere between O(n^2) and O(n^3),* depending on the input data.** There is also a faster implementation that uses a large working buffer* in which a "jump table" is stored, which is used to quickly find* possible string matches (see the source code for LZ_CompressFast() for* more information). The faster method is an order of magnitude faster,* but still quite slow compared to other compression methods.** The upside is that decompression is very fast, and the compression ratio* is often very good.** The reference to a string is coded as a (length,offset) pair, where the* length indicates the length of the string, and the offset gives the* offset from the current data position. To distinguish between string* references and literal strings (uncompressed bytes), a string reference* is preceded by a marker byte, which is chosen as the least common byte* symbol in the input data stream (this marker byte is stored in the* output stream as the first byte).** Occurrences of the marker byte in the stream are encoded as the marker* byte followed by a zero byte, which means that occurrences of the marker* byte have to be coded with two bytes.** The lengths and offsets are coded in a variable length fashion, allowing* values of any magnitude (up to 4294967295 in this implementation).** With this compression scheme, the worst case compression result is* (257/256)*insize + 1.**-------------------------------------------------------------------------* Copyright (c) 2003-2006 Marcus Geelnard** This software is provided 'as-is', without any express or implied* warranty. In no event will the authors be held liable for any damages* arising from the use of this software.** Permission is granted to anyone to use this software for any purpose,* including commercial applications, and to alter it and redistribute it* freely, subject to the following restrictions:** 1. The origin of this software must not be misrepresented; you must not*    claim that you wrote the original software. If you use this software*    in a product, an acknowledgment in the product documentation would*    be appreciated but is not required.** 2. Altered source versions must be plainly marked as such, and must not*    be misrepresented as being the original software.** 3. This notice may not be removed or altered from any source*    distribution.** Marcus Geelnard* marcus.geelnard at home.se*************************************************************************//************************************************************************** Constants used for LZ77 coding*************************************************************************//* Maximum offset (can be any size < 2^31). Lower values give faster   compression, while higher values gives better compression. The default   value of 100000 is quite high. Experiment to see what works best for   you. */#define LZ_MAX_OFFSET 100000/**************************************************************************                           INTERNAL FUNCTIONS                           **************************************************************************//************************************************************************** _LZ_StringCompare() - Return maximum length string match.*************************************************************************/static uint32_t _LZ_StringCompare( unsigned char * str1,  unsigned char * str2, uint32_t minlen, uint32_t maxlen ){    uint32_t len;    for( len = minlen; (len < maxlen) && (str1[len] == str2[len]); ++ len );    return len;}/************************************************************************** _LZ_WriteVarSize() - Write uint32_teger with variable number of* bytes depending on value.*************************************************************************/static int _LZ_WriteVarSize( uint32_t x, unsigned char * buf ){    uint32_t y;    int num_bytes, i, b;    /* Determine number of bytes needed to store the number x */    y = x >> 3;    for( num_bytes = 5; num_bytes >= 2; -- num_bytes )    {        if( y & 0xfe000000 ) break;        y <<= 7;    }    /* Write all bytes, seven bits in each, with 8:th bit set for all */    /* but the last byte. */    for( i = num_bytes-1; i >= 0; -- i )    {        b = (x >> (i*7)) & 0x0000007f;        if( i > 0 )        {            b |= 0x00000080;        }        *buf ++ = (unsigned char) b;    }    /* Return number of bytes written */    return num_bytes;}/************************************************************************** _LZ_ReadVarSize() - Read uint32_teger with variable number of* bytes depending on value.*************************************************************************/static int _LZ_ReadVarSize( uint32_t * x, unsigned char * buf ){    uint32_t y, b, num_bytes;    /* Read complete value (stop when byte contains zero in 8:th bit) */    y = 0;    num_bytes = 0;    do    {        b = (uint32_t) (*buf ++);        y = (y << 7) | (b & 0x0000007f);        ++ num_bytes;    }    while( b & 0x00000080 );    /* Store value in x */    *x = y;    /* Return number of bytes read */    return num_bytes;}/**************************************************************************                            PUBLIC FUNCTIONS                            **************************************************************************//************************************************************************** LZ_Compress() - Compress a block of data using an LZ77 coder.*  in     - Input (uncompressed) buffer.*  out    - Output (compressed) buffer. This buffer must be 0.4% larger*           than the input buffer, plus one byte.*  insize - Number of input bytes.* The function returns the size of the compressed data.*************************************************************************/int LZ_Compress( unsigned char *in, unsigned char *out,    uint32_t insize ){    unsigned char marker, symbol;    uint32_t  inpos, outpos, bytesleft, i;    uint32_t  maxoffset, offset, bestoffset;    uint32_t  maxlength, length, bestlength;    uint32_t  histogram[ 256 ];    unsigned char *ptr1, *ptr2;    /* Do we have anything to compress? */    if( insize < 1 )    {        return 0;    }    /* Create histogram */    for( i = 0; i < 256; ++ i )    {        histogram[ i ] = 0;    }    for( i = 0; i < insize; ++ i )    {        ++ histogram[ in[ i ] ];    }    /* Find the least common byte, and use it as the marker symbol */    marker = 0;    for( i = 1; i < 256; ++ i )    {        if( histogram[ i ] < histogram[ marker ] )        {            marker = i;        }    }    /* Remember the marker symbol for the decoder */    out[ 0 ] = marker;    /* Start of compression */    inpos = 0;    outpos = 1;    /* Main compression loop */    bytesleft = insize;    do    {        /* Determine most distant position */        if( inpos > LZ_MAX_OFFSET ) {          maxoffset = LZ_MAX_OFFSET;        }        else {        maxoffset = inpos;        }        /* Get pointer to current position */        ptr1 = &in[ inpos ];        /* Search history window for maximum length string match */        bestlength = 3;        bestoffset = 0;        for( offset = 3; offset <= maxoffset; ++ offset )        {            /* Get pointer to candidate string */            ptr2 = &ptr1[ -(int)offset ];            /* Quickly determine if this is a candidate (for speed) */            if( (ptr1[ 0 ] == ptr2[ 0 ]) &&                (ptr1[ bestlength ] == ptr2[ bestlength ]) )            {                /* Determine maximum length for this offset */                maxlength = (bytesleft < offset ? bytesleft : offset);                /* Count maximum length match at this offset */                length = _LZ_StringCompare( ptr1, ptr2, 0, maxlength );                /* Better match than any previous match? */                if( length > bestlength )                {                    bestlength = length;                    bestoffset = offset;                }            }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av色综合久久天堂av综合| 色哟哟国产精品免费观看| 粉嫩av一区二区三区粉嫩 | 99re成人精品视频| 欧美高清激情brazzers| 国产精品丝袜在线| 麻豆精品一区二区| 欧美少妇性性性| 中文字幕中文字幕在线一区 | 欧美精品一卡两卡| 日本午夜一本久久久综合| 国产精品系列在线播放| 欧美日韩国产在线播放网站| 中文字幕国产一区二区| 麻豆一区二区在线| 亚洲男人的天堂网| 国产精品天美传媒| 国精产品一区一区三区mba桃花| 色婷婷av久久久久久久| 亚洲欧洲国产日本综合| 国产高清成人在线| 精品国产伦一区二区三区免费 | 久久精品视频免费| 蜜芽一区二区三区| 欧美日韩精品欧美日韩精品一| 国产精品久久久久久久久久免费看| 黑人巨大精品欧美一区| 日韩免费电影网站| 日韩精品电影在线观看| 欧美二区三区91| 天天射综合影视| 欧美精品久久久久久久多人混战 | 国内精品不卡在线| 日韩一区二区中文字幕| 青草av.久久免费一区| 日韩视频免费观看高清在线视频| 天堂久久一区二区三区| 欧美人伦禁忌dvd放荡欲情| 亚洲在线视频网站| 欧美日韩视频在线第一区 | 欧美美女喷水视频| 日韩国产欧美视频| 精品理论电影在线| 丁香激情综合国产| 亚洲免费观看高清| 欧美午夜精品电影| 美女脱光内衣内裤视频久久影院| 91精品国产欧美一区二区18| 日本不卡一二三区黄网| 久久综合九色综合97_久久久| 极品少妇xxxx偷拍精品少妇| 久久精品亚洲精品国产欧美kt∨| 国产成人综合亚洲91猫咪| 国产精品色婷婷久久58| 99久久久久久| 亚洲国产欧美在线人成| 91精品国产一区二区三区 | 色综合久久99| 视频一区二区欧美| 久久久www成人免费毛片麻豆| 菠萝蜜视频在线观看一区| 亚洲国产精品一区二区www| 日韩一区二区三区免费看| 国产麻豆精品视频| 亚洲乱码日产精品bd| 91精品国产综合久久久久久漫画 | 久久国内精品视频| 日本一区二区三级电影在线观看| 99re6这里只有精品视频在线观看| 亚洲aaa精品| 国产欧美一区二区精品秋霞影院| 色呦呦日韩精品| 久久99精品国产| 亚洲码国产岛国毛片在线| 日韩一区二区免费在线观看| 成人福利视频网站| 日本不卡一区二区三区高清视频| 国产精品国产成人国产三级| 91精品国产入口| 色成年激情久久综合| 久久狠狠亚洲综合| 亚洲风情在线资源站| 国产欧美一区二区精品婷婷| 欧美日韩在线不卡| 成人精品视频一区二区三区 | 精品免费视频.| 欧美在线一二三四区| 国产伦精品一区二区三区免费迷| 亚洲综合在线电影| 国产亚洲午夜高清国产拍精品| 欧美日韩一区视频| 成人h精品动漫一区二区三区| 久久99国产乱子伦精品免费| 亚洲二区视频在线| 樱桃国产成人精品视频| 久久精品视频一区二区| xnxx国产精品| 欧美一区午夜精品| 在线观看日韩电影| 色婷婷亚洲精品| av不卡免费电影| 粉嫩久久99精品久久久久久夜| 久久99热99| 蜜臀av亚洲一区中文字幕| 亚洲123区在线观看| 一级日本不卡的影视| 综合久久国产九一剧情麻豆| 中文字幕欧美三区| 国产午夜亚洲精品理论片色戒| 精品乱人伦小说| 精品国产髙清在线看国产毛片| 5858s免费视频成人| 欧美电影在线免费观看| 7777精品伊人久久久大香线蕉超级流畅| 色综合天天综合网天天看片| 99re这里只有精品视频首页| 成人午夜电影网站| 成人av在线一区二区三区| 成人综合激情网| 处破女av一区二区| 91丝袜国产在线播放| 色婷婷综合中文久久一本| 色吊一区二区三区| 欧美三级视频在线观看| 欧美欧美欧美欧美首页| 日韩亚洲国产中文字幕欧美| 欧美成人精品二区三区99精品| 精品精品国产高清a毛片牛牛 | 精品一区二区三区蜜桃| 久久99精品国产麻豆婷婷| 国内精品第一页| 99久久久国产精品免费蜜臀| 色国产精品一区在线观看| 91精品国产综合久久久蜜臀粉嫩| 欧美mv日韩mv亚洲| 中文字幕精品综合| 怡红院av一区二区三区| 午夜视频一区在线观看| 久久99久久精品| 成人av影视在线观看| 色婷婷精品久久二区二区蜜臂av| 欧美高清性hdvideosex| 亚洲精品在线免费播放| 中文字幕一区二区三区视频| 亚洲午夜精品在线| 捆绑变态av一区二区三区| 成人性生交大合| 7777精品伊人久久久大香线蕉 | 成人福利视频在线看| 欧美午夜电影网| wwwwww.欧美系列| 国产女同性恋一区二区| 一区二区三区.www| 韩国成人在线视频| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美酷刑日本凌虐凌虐| 久久精品在线观看| 午夜久久久影院| 高清shemale亚洲人妖| 欧美精品久久久久久久多人混战 | 波波电影院一区二区三区| 欧美午夜电影在线播放| 国产亚洲精品超碰| 色屁屁一区二区| 激情久久五月天| 欧美日韩免费不卡视频一区二区三区 | 欧美一区二区三区在线电影| 一色屋精品亚洲香蕉网站| 免费美女久久99| 色哟哟一区二区在线观看| 久久精品夜夜夜夜久久| 在线播放国产精品二区一二区四区 | 色综合久久66| 久久综合中文字幕| 亚洲高清视频中文字幕| 国产精品资源在线| 欧美一级国产精品| 亚洲第一久久影院| 91蝌蚪porny| 国产女人18水真多18精品一级做| 麻豆精品视频在线观看视频| 欧美少妇一区二区| 亚洲自拍都市欧美小说| av电影天堂一区二区在线观看| 精品国产凹凸成av人网站| 日欧美一区二区| 欧美熟乱第一页| 亚洲综合另类小说| 91免费精品国自产拍在线不卡| 欧美国产一区二区| 国产激情一区二区三区| 久久伊99综合婷婷久久伊| 美女视频黄 久久| 这里只有精品免费| 亚洲成a人在线观看| 欧美日韩国产精选| 午夜日韩在线观看| 4438x成人网最大色成网站| 丝瓜av网站精品一区二区| 欧美日韩免费电影|