在 Visual C 中使用 minizip 2010年
我已经编程有一段时间了,但由于某种原因,我就是找不到如何做一些我知道必须简单的事情。我想使用一个不需要 dll 或任何其他帮助文件的小实用程序创建 zip 文件。我发现一些地方推荐使用 zlib 和 minizip 来处理 zip 文件。我只是不知道如何使用它们。我已经安装了 zlib,但我不知道如何安装或使用 minizip。我发现的每件事都假设我已经设置了使用它的环境,并且“您需要做的就是使用函数 X ,瞧!”我一直在尝试寻找如何使用外部库,但我也以这种方式得到同样模糊的信息。有没有什么书可以作为开始寻找的地方?我完全赞成自学,但实际上我很迷失从哪里开始。
I've been programming for a while, but for some reason I just can't find how to do something that I know has to be simple. I want to create zip files with a small utility that does not require dlls or any other helper files. I found a few places that recommend using zlib and minizip to work with zip files. I just can't figure out HOW to use them. I've installed zlib, but I have no clue how to install or use minizip. Every thing I find assumes I already have my environment set up to use it and "all you need to do is use function X and voila!" I've been trying to find how to use external libraries, but I'm getting just as vague info that way too. Are there any books that might be a place to start looking? I'm all for educating myself, but I'm actually quite lost with where to start on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 CodeProject 上查看 XZip:http://www.codeproject.com/KB/cpp/xzipunzip。 aspx
如果您不想使用任何 DLL,这是一个不错的选择。我最近一直在 C# .NET 程序中使用 7-Zip DLL。 7-Zip SDK 本身使用起来并不有趣,而且我所知道的所有真正有效的解决方案都需要 7-Zip DLL。然而,一旦集成 7-Zip,您就可以集成 ZIP、TAR、RAR 以及几乎所有其他归档格式。 7-Zip 格式本身是我最喜欢的,因为它通常提供最好的压缩。
对于 .NET 托管代码,SevenZipSharp 库使集成 7-Zip DLL 变得轻而易举:
http://sevenzipsharp.codeplex.com/
Checkout XZip on CodeProject: http://www.codeproject.com/KB/cpp/xzipunzip.aspx
If you don't want to have to use any DLL's, that is a way to go. I've been using the 7-Zip DLLs with C# .NET programs lately. The 7-Zip SDK itself is not fun to work with, and all the solutions I know of that really work require the 7-Zip DLLs. However, once you integrate 7-Zip, you have ZIP, TAR, RAR, just about every other archive format integrated. The 7-Zip format itself is my favorite as it generally offers the best compression.
For .NET managed code, the SevenZipSharp library makes integrating the 7-Zip DLLs a snap:
http://sevenzipsharp.codeplex.com/