⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 encode.c

📁 算术码编码代码源程序
💻 C
字号:
/* MAIN PROGRAM FOR ENCODING. */#include <stdio.h>#include "model.h"main(){   start_model();				/* Set up other modules.    */    start_outputing_bits();    start_encoding();    for (;;) {					/* Loop through characters. */        int ch; int symbol;        ch = getc(stdin);			/* Read the next character. */        if (ch==EOF) break;			/* Exit loop on end-of-file.*/        symbol = char_to_index[ch];		/* Translate to an index.   */        encode_symbol(symbol,cum_freq);		/* Encode that symbol.      */        update_model(symbol);			/* Update the model.        */    }    encode_symbol(EOF_symbol,cum_freq);		/* Encode the EOF symbol.   */    done_encoding();				/* Send the last few bits.  */    done_outputing_bits();    exit(0);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -