Tag: unzip

如何在Windows Phone 8应用程序中解压缩IsolatedStorage中的文件?

在我的应用程序内,我试图一次下载大约180个小音频文件。 我尝试了BackgroundTransferService,但是对于这么多小文件它似乎并不稳定。 所以,现在我正在下载所有这些音频的ZIP,并希望在“audio”文件夹中提取它们。 我尝试了这个线程中的方法: 如何在Windows Phone 8中解压缩文件 但我收到此错误: ‘System.IO.IOException’ occurred in mscorlib.ni.dll…中’System.IO.IOException’ occurred in mscorlib.ni.dll…在以下代码中。 我怎样才能克服这个问题? while (reader.ReadInt32() != 101010256) { reader.BaseStream.Seek(-5, SeekOrigin.Current); // this line causes error }… 此外,我在哪里需要放置此代码,我在哪里给它目标目录? IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication(); using (IsolatedStorageFileStream fileStream = myIsolatedStorage.OpenFile(@”audio.rar”, FileMode.Open, FileAccess.ReadWrite)) { UnZipper unzip = new UnZipper(fileStream); foreach (string filename in unzip.FileNamesInZip()) { string FileName […]