如何查找离子zip文件的未压缩大小

编程入门 行业动态 更新时间:2024-10-19 14:51:07
本文介绍了如何查找离子zip文件的未压缩大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个使用 Ionic zip 压缩的zip文件。提取之前,我需要验证可用磁盘空间。但是,我如何事先找到未压缩的尺寸? zip文件中有任何标题信息(通过离子),以便我可以读取吗?

I have a zip file compressed using Ionic zip. Before extracting I need to verify the available disk space. But how do I find the uncompressed size before hand? Is there any header information in the zip file (by ionic) so that I can read it?

推荐答案

这应该可以解决问题:

选项1

static long totaluncompressedsize; static string info; foreach (ZipEntry e in zip) { long uncompressedsize = e.UncompressedSize; totaluncompressedsize += uncompressedsize; }

或选项2-将需要筛选大量信息

Or option 2 - will need to sift through the mass of info

using (ZipFile zip = ZipFile.Read(zipFile)) { info = zip.Info; }

更多推荐

如何查找离子zip文件的未压缩大小

本文发布于:2023-11-12 04:04:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580471.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:离子   大小   文件   zip

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!