📄 main.cpp
字号:
#include <string.h>
#include <iostream.h>
#include "redfun.h"
#include "unredfun.h"
void main(int argc,char *argv[])
{
if(argc==0 || argc!=4)
{
cout<<"reduce /O:opt SrcFile DstFile"<<endl;
cout<<'\t'<<"/O"<<'\t'<<"指定操作选项开关"<<endl;
cout<<'\t'<<"opt"<<'\t'<<"c 压缩"<<endl;
cout<<'\t'<<'\t'<<"e 解压缩"<<endl;
cout<<'\t'<<"SrcFile"<<'\t'<<"指定待压缩(或解压缩)的源文件名"<<endl;
cout<<'\t'<<"DstFile"<<'\t'<<"指定将要生成的目标文件名"<<endl;
}
else
{
if(argv[1][3] == 'c')
{
FReduce a(argv[2]);
if(!a.FCoding())
{
cout<<"file coding error!!"<<endl;
}
if(!a.FReduceSaving(argv[3]))
{
cout<<"file reduce saving error!!"<<endl;
}
a.TestResult(argv[2], argv[3]);
}
else
{
if(argv[1][3] == 'e')
{
FUReduce b(argv[2]);
if(!b.ReadFHead())
{
cout<<"reading file head error!!"<<endl;
}
else
{
b.CreatDecodeTree();
b.UnReduceSaving(argv[3]);
}
b.TestRusult();
}
else
{
cout<<"参数错误,请输入reduce后按回车参考帮助。"<<endl;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -