使用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文档,没有使用至少一个构造/函数的例子。

最新更新