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

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

?? model-1a.c

?? Lossless Data Compression Toolkit Version 1.1 of the lossless data compression toolkit by Nico deVri
?? C
字號:
/*
 * Listing 16 -- model-1a.c
 *
 * This module is an order-1 fixed-context modeling unit that can
 * be using in conjunction with comp-1.c and expand-1.c to compress
 * and expand files.  It is a very simple implementation of an order-1
 * model, using the same techniques for storing counts as were used
 * in model-1.c.  This means that it uses a lot of memory, around
 * 140 Kbytes, and that it spends a lot of time updating the table.
 * Since it can loop up context tables with a simple index on the
 * context character, it is still pretty fast.
 *
 * Building the compression and expansion programs with this model
 * requires moving up to compact model.
 *
 * Building the compressor:
 *
 * Turbo C:     tcc -w -mc comp-1.c model-1a.c bitio.c coder.c
 * QuickC:      qcl /AC /W3 comp-1.c model-1a.c bitio.c coder.c
 * Zortech:     ztc -mc comp-1.c model-1a.c bitio.c coder.c
 * *NIX:        cc -o comp-1 comp-1.c model-1a.c bitio.c coder.c
 *
 * Building the decompressor:
 *
 * Turbo C:     tcc -w -mc expand-1.c model-1a.c bitio.c coder.c
 * QuickC:      qcl /AC /W3 expand-1.c model-1a.c bitio.c coder.c
 * Zortech:     ztc -mc expand-1.c model-1a.c bitio.c coder.c
 * *NIX:        cc -o expand-1 expand-1.c model-1a.c bitio.c coder.c
 */
#include <stdio.h>
#include <stdlib.h>
#include "coder.h"
#include "model.h"

/*
 * *totals[] is an array of pointers to context tables.  The EOF
 * character doesn't get a context table, since we stop encoding
 * as soon as that character appears.  Each context table is
 * an array of ints with indices ranging from -1 to 255.
 */
short int *totals[ 256 ];
/*
 * context is the last character encoded or decoded.  It is
 * used to index to the appropriate context table.  We start the
 * model with an arbitray context of 0;
 */
int context = 0;

/*
 * To initialize the model, I create all 256 context tables, and
 * set all the counts in the table to 1.  By default, the model
 * starts up in context 0, as if the last byte in was '\0'.  Since
 * each context table is supposed to be indexed from -1 to 255,
 * I increment the pointer to the table in totals[], so that the
 * array can be safely indexed with -1.
 */
void initialize_model()
{
    int i;
    short int j;
    int array_size;

    array_size = sizeof( short int * ) * ( 257 + 1 );
    for ( i = 0 ; i < 256 ; i++ )
    {
        totals[ i ] = (short int *) malloc( array_size ) ;
        if ( totals[ i ] == NULL )
        {
            printf( "Error allocating table space!\n" );
            exit( 1 );
        }
        totals[ i ]++;
        for ( j = -1 ; j <= 256 ; j++ )
            totals[ i ][ j ] = j + 1;
    }
}

/*
 * When the table is updated, every count above "symbol" needs to
 * be incremented, which is somewhat expensive.  If the counts
 * have become to large, the table needs to be rescaled.  While
 * rescaling, we have to make sure that none of the counts drop
 * below 1.  After the update is complete, the context is changed
 * to be the symbol that was just updated.
 */
void update_model( int symbol )
{
    int i;

    for ( i = symbol+1 ; i <= 256; i++ )
        totals[ context ][ i ]++;
    if ( totals[ context ][ 256 ] == MAXIMUM_SCALE )
    {
        for ( i = 0 ; i <= 256 ; i++ )
	{
            totals[ context ][ i ] /= 2;
            if ( totals[ context ][ i ] <= totals[ context ][ i-1 ])
                totals[ context ][ i ] = totals[ context ][ i-1 ] + 1;
	}
    }
    context = symbol;
}

/*
 * Since the context table can be directly indexed with the
 * symbol, getting the low and high counts for the particular
 * symbol is nice and easy.
 */
int convert_int_to_symbol( int c, SYMBOL *s )
{
    s->scale = totals[ context ][ 256 ];
    s->low_count = totals[ context ][ c ];
    s->high_count = totals[ context ][ c + 1 ];
    return( 0 );
}
/*
 * The symbols scale is always in the same place, which is nice.
 */
void get_symbol_scale( SYMBOL *s )
{
    s->scale = totals[ context ][ 256 ];
}
/*
 * To find the symbol whose low and high values straddle count
 * requires walking through the table until a match is found.
 * This is a lengthy operation, and helps to keep decoding
 * slower than encoding.
 */
int convert_symbol_to_int( int count, SYMBOL *s )
{
    int c;

    for ( c = 256; count < totals[ context ][ c ] ; c-- )
        ;
    s->high_count = totals[ context ][ c + 1 ];
    s->low_count = totals[ context ][ c ];
    return( c );
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲午夜三级在线| 97久久超碰精品国产| 奇米色一区二区三区四区| 亚洲一二三四区不卡| 亚洲一区二区中文在线| 亚洲精品国产a| 福利一区福利二区| 精品在线一区二区三区| 另类欧美日韩国产在线| 蜜桃精品视频在线| 久久99精品国产麻豆婷婷洗澡| 日韩有码一区二区三区| 日本中文字幕一区二区有限公司| 日韩专区一卡二卡| 老鸭窝一区二区久久精品| 国内精品在线播放| 国产成人精品一区二区三区四区| 丰满白嫩尤物一区二区| 风间由美中文字幕在线看视频国产欧美 | 欧美大片日本大片免费观看| 日韩视频在线你懂得| 精品久久久久久久久久久久包黑料| 日韩午夜av电影| 久久久久久久久99精品| 亚洲国产精品99久久久久久久久| 中文字幕一区二区在线播放| 亚洲激情五月婷婷| 天堂资源在线中文精品| 蜜桃视频一区二区| 国产经典欧美精品| 91蜜桃传媒精品久久久一区二区| 欧美午夜精品久久久久久孕妇 | 日韩精品一区二| 久久久一区二区三区捆绑**| 国产欧美精品一区二区色综合| 国产精品乱码久久久久久| 亚洲精品一二三| 日韩va亚洲va欧美va久久| 韩国av一区二区| 91免费看视频| 欧美精品在欧美一区二区少妇| 日韩精品自拍偷拍| 国产精品美女久久久久久| 亚洲国产精品久久久男人的天堂| 日本亚洲一区二区| 丰满白嫩尤物一区二区| 欧美日韩免费电影| 久久久青草青青国产亚洲免观| 国产精品久久国产精麻豆99网站| 亚洲自拍偷拍图区| 国产在线不卡一卡二卡三卡四卡| 91亚洲永久精品| 91精品国产免费| 国产精品久久午夜夜伦鲁鲁| 手机精品视频在线观看| 国产suv精品一区二区6| 欧美日韩电影一区| 亚洲国产精华液网站w | 欧美日韩精品二区第二页| 精品国精品国产尤物美女| 亚洲黄色小视频| 国产麻豆精品视频| 欧美日韩在线播| 欧美国产一区二区在线观看 | 91丨porny丨中文| 日韩久久免费av| 一区二区三区四区中文字幕| 精品一区二区影视| 欧美午夜电影网| 国产精品午夜久久| 久久精品国产第一区二区三区| 色狠狠色噜噜噜综合网| 国产喂奶挤奶一区二区三区| 青青草伊人久久| 色欧美片视频在线观看| 久久精品视频在线免费观看| 五月婷婷久久丁香| 91浏览器在线视频| 国产精品视频线看| 韩国欧美一区二区| 91精品国产一区二区三区香蕉| 亚洲欧美视频在线观看| 国产激情一区二区三区桃花岛亚洲| 欧美人成免费网站| 一区二区三区高清不卡| 本田岬高潮一区二区三区| 久久久夜色精品亚洲| 日韩国产在线观看一区| 波波电影院一区二区三区| 久久亚洲私人国产精品va媚药| 青青草91视频| 欧美日本不卡视频| 亚洲va欧美va人人爽| 在线观看成人免费视频| 亚洲乱码日产精品bd| 成人aa视频在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 韩国三级中文字幕hd久久精品| 欧美一区二区三区啪啪| 日韩制服丝袜av| 欧美欧美欧美欧美| 日韩精品亚洲一区| 6080亚洲精品一区二区| 日韩主播视频在线| 91精品国产91综合久久蜜臀| 天堂成人国产精品一区| 欧美日韩国产精品成人| 亚洲第一久久影院| 欧美日韩国产成人在线免费| 亚洲电影你懂得| 在线成人高清不卡| 蜜桃传媒麻豆第一区在线观看| 日韩欧美你懂的| 久久爱www久久做| 久久精品一区二区三区av| 国产精品一二三区| 欧美国产日韩精品免费观看| 风间由美一区二区av101| 亚洲国产精品ⅴa在线观看| 99久久99久久精品免费看蜜桃 | 国产一区二区美女| 国产清纯在线一区二区www| 成人av在线播放网站| 亚洲欧美区自拍先锋| 欧美性色综合网| 奇米色777欧美一区二区| 久久这里只有精品6| 9色porny自拍视频一区二区| 亚洲免费电影在线| 欧美精品日韩精品| 国产乱人伦精品一区二区在线观看| 亚洲国产精品t66y| 在线免费观看日本一区| 午夜精品久久久久久久99水蜜桃| 欧美一区三区四区| 国产二区国产一区在线观看| 成人欧美一区二区三区视频网页| 欧美在线观看一区| 狠狠久久亚洲欧美| 亚洲欧美日韩一区二区三区在线观看| 欧美网站一区二区| 极品尤物av久久免费看| 亚洲欧洲精品一区二区三区不卡| 欧美亚洲国产一区二区三区va| 美女视频黄a大片欧美| 中文字幕巨乱亚洲| 欧美男男青年gay1069videost| 激情综合亚洲精品| 亚洲欧美另类小说| 精品日韩欧美在线| 91黄视频在线观看| 激情综合色丁香一区二区| 国产精品国产成人国产三级| 欧美肥妇bbw| 99久久精品免费看| 久久成人免费日本黄色| 最新国产の精品合集bt伙计| 欧美一区二区三区在线看| 成人黄色综合网站| 奇米精品一区二区三区在线观看 | 26uuu精品一区二区| 99免费精品在线观看| 另类欧美日韩国产在线| 亚洲精品乱码久久久久久黑人 | 怡红院av一区二区三区| 26uuu色噜噜精品一区二区| 色综合久久中文字幕综合网| 精品一区二区三区免费观看| 夜色激情一区二区| 日本一区二区成人| 欧美一区二区三区免费视频| 91色九色蝌蚪| 国产老妇另类xxxxx| 亚洲成av人片在线观看| 国产精品国产自产拍高清av王其| 欧美一区二区三区视频免费 | 久久久午夜电影| 欧美日韩aaa| 一本色道久久综合亚洲精品按摩| 国产一区不卡视频| 天天操天天色综合| 亚洲男人的天堂av| 国产精品久久久久久亚洲毛片 | 寂寞少妇一区二区三区| 婷婷中文字幕一区三区| 亚洲精品国产品国语在线app| 国产亚洲午夜高清国产拍精品| 678五月天丁香亚洲综合网| 欧美在线一区二区三区| 成人h动漫精品一区二区| 国产中文字幕精品| 毛片av一区二区三区| 五月激情综合网| 亚洲一区二区三区视频在线| 最新日韩在线视频| 国产精品美女久久久久久久网站| 国产亚洲精品精华液| 欧美精品一区二区三区视频| 日韩亚洲欧美在线| 91精品国产综合久久精品|