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

📄 substrhuff.cpp

📁 Octane v1.01.20 The Open Compression Toolkit for C++ . The Open Compression Toolkit is a set of mo
💻 CPP
字号:
/// @file substrhuff.cpp
/// Compressor that uses the SubString Parser, a 0-Order Model and a Huffman Coder
///
/// @remarks
/// This compressor basically does nothing but coordinate these three components.
///
/// @author mouser
/// @date   2003.07.29
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
// application includes
#include "substrhuff.hpp"
// system includes
using namespace std;
//---------------------------------------------------------------------------


//---------------------------------------------------------------------------
// Create a global instance in order to register it automatically with the global manager
SubStrHuffCompressor GloballyInstantiated_SubStrHuffCompressor(true);
//---------------------------------------------------------------------------


//---------------------------------------------------------------------------
SubStrHuffCompressor::SubStrHuffCompressor(bool registerme)
	:OctaneCompressor_Statistical(registerme)
{
	// create the children objects
	parserp=new SubstringParser();
	modelerp=new ZeroOrderModeler();
	coderp=new HuffmanCoder();

	// REGISTER WITH COMPRESSOR MANAGER
	//  this use a trick to make sure the global manager is ready for registration
 	//  and at the same time automatically register this instance with the global manager
 	// note that the insurer is just temporary, and deletes when we exit the procedure
 	if (registerme)
		CompressorManager_SingletonInsurer managerinsurance(this);
	
	// now default setup of components
	SetupAnyDefaultParser();
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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