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

📄 decode.cpp

📁 推荐一个快速压缩算法
💻 CPP
字号:
// decode.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include "model.h"


class CDecode
: public CArithmeticModel<CDecode>
{
public:
	int GetByte()
	{
        return getc(stdin);			
	}
	void main()
	{
		start_model();				/* Set up other modules.    */
		start_inputing_bits();
		start_decoding();
		for (;;) {					/* Loop through characters. */
			int ch; int symbol;
			symbol = decode_symbol(cum_freq);	/* Decode next symbol.      */
			if (symbol==EOF_symbol) break;		/* Exit loop if EOF symbol. */
			ch = index_to_char[symbol];		/* Translate to a character.*/
			putc(ch,stdout);			/* Write that character.    */
			update_model(symbol);			/* Update the model.        */
		}
	}
};

int main(int /*argc*/, char* /*argv[]*/)
{
	_setmode( _fileno( stdin ), _O_BINARY );
	_setmode( _fileno( stdout ), _O_BINARY );

	CDecode model;
	model.main();

	return 0;
}

⌨️ 快捷键说明

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