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

📄 textquery.h

📁 文件压缩与解压
💻 H
字号:
# ifndef TEXTQUERY_CLASS
# define TEXTQUERY_CLASS

# include <iostream>
# include <fstream>
# include <map>
# include <string>
# include <vector>
# include <string>
# include <bitset>

using namespace std;

# include "Heap.h"
# include "ExtBinTree.h"


class TextQuery
{
public:
	TextQuery():sum(0){}
	void BuildMap(ifstream& in,string file_name);
	map<char,int>& GetMap(){return m;}
	ExtBinTree<char>* HuffumanTree();
	void Encode();
	int Decode(char& ch,string& str,string file_name);
	void Compress(ifstream& in,string source_file,ofstream& on,string destination_file);
	void Depress(ifstream& in,string source_file,ofstream& on,string destination_file);
	size_t sum;
	size_t last;
	string str;
	string strall;
	string strpre;
private:
	ExtBinTree<char>* tree;
	map<char,int> m;
	map<char,string> huffumancode;
};

# endif

⌨️ 快捷键说明

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