- #include <fstream>
- #include <string>
- #include "Dictionary.h"
- int main(int argc, char* argv[])
- {
- std::ifstream file("test2.lzw");
- std::ofstream out("test2.txt");
- std::string prefix = "";
- char ch;
- long mask;
- Dictionary dict;
- while (!file.eof())
- {
- file>>mask>>ch;
- std::string temp = dict.get_perfix(mask)+ch;
- out<<temp;
- dict.add(temp);
- }
- std::cout<<"decompress success"<<std::endl;
- return 0;
- }
解压算法
最新推荐文章于 2024-06-21 10:02:14 发布