如何解决使用 wxStreams 解压 .tar 文件
我正在尝试仅使用 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 文档,没有使用至少一种构造/函数的示例。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。