压缩文件并阅读信息 [英] Uzipping Files and Reading Info

查看:80
本文介绍了压缩文件并阅读信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我一直在使用DotNetZip库将文件解压缩到目标文件夹,但是p [过程太慢,有人可以建议我这样做的任何更快方法.我使用的代码是:

Hi,
I have been using the DotNetZip Library to unzip the files to a destination folder,but the p[process is too slow, can anyone suggest me any faster way to do so. the code I am using is :

using(var zip = Ionic.Zip.ZipFile.Read(Filename)) 
{ 
    zip.ExtractAll(DestinationFolderPath); 
} 



我要解压缩2200个文件,这会花费很多时间,有人可以建议一种更快的方法.因此,我尝试使用内存映射"文件来加快处理过程,以便可以将文件提取到虚拟内存中,但这不能作为



This takes a hell of a lot of time, as I am unzipping around 2200 files Can anyone suggest a faster way to do so. So I tried using Memory mapped files in order to make the process faster so that I can extract the files on the virtual memory, but this didn''t work as

zip1.ExtractAll(Destination_path);

需要一个目标路径,而我无法获取一个用于内存映射文件的路径.

我的问题是:有什么办法可以减少我提取硬盘上文件的时间,还是有什么我不需要提取和获取所有信息的方法?如果有人知道答案,请告诉我.

请注意,我的应用程序基于Windows.

谢谢

requires a destination path and I cant get one for the memory mapped files.

My Question is : Is there any way I can reduce the amount of time taken to extract the files on my hard disk or is there any way I dont have to extract and get all the information?Please let me know if someone knows the answer.

Please note my application is windows based.

Thanks

推荐答案

嗯.我认为没有比这更有效的方法了.考虑一下在Windows资源管理器中解压缩文件所花费的时间,该文件是Microsoft快速创建的.您可能有一个批处理的在线解压缩服务,您可以将文件上传到该服务.他们可能能够更快地完成此任务,具体取决于他们的硬件.
Hmm. I don''t think there is a much more efficient way. Think of the time it takes to unzip a file in Windows Explorer, and that was created with speed in mind, by Microsoft. There may be a batch online unzipping service that you can upload your files to. They may be able to do it faster, depending on their hardware.


这篇关于压缩文件并阅读信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆