问题描述
我正在尝试仅使用 wxWidgets 中可用的默认解压缩库来解压缩 .tar。
我的代码:
//Creating empty dir?
wxMkdir dir(dest_path2);
wxFFileInputStream dirfile(dest_path2);
wxZlibInputStream dirin(dirfile,wxZLIB_GZIP);
dir.Write(dirin);
解决方法
//Creating empty dir
wxFFileOutputStream directory(dest_path2);
//Creating a decompression stream from a file
wxFFileInputStream tarfile2(dest_path);
//Decompress the data from stream
wxTarInputStream tarin(tarfile2,????);
//Saving stream decompressed files to directory
tarfile2.GetFile(tarin);
//Close
tarfile2.Close();
我不明白 wxTarInputStream 构造函数
wxTarInputStream::wxTarInputStream(wxInputStream &stream,wxMBConv& conv =wxConvLocal );
后面的每个文件都要用GetNextEntry函数输入吗?
wxTarEntry* wxTarInputStream::GetNextEntry();
我还不太擅长使用 wxWidgets 文档,没有使用至少一种构造/函数的示例。