如何使用 Delphi 将多个文件压缩到一个存档中
我需要使用 Delphi 将多个文件压缩到一个存档中。 我更喜欢使用免费软件组件或开源组件,因为我非常非常便宜:-)
我的主要要求是:
- 可以对存档进行加密
- 可以创建任何拥有 WinZip 副本的人都可以打开的公共存档
有谁有他们使用过的组件的建议? 请随时推荐免费和商业组件/库。
I need to compress multiple files into a single archive using Delphi. I'd prefer to use freeware components or open-source components because I am very very cheap :-)
My primary requirements are:
- Possible to encrypt the archive
- Can create common archives that can be opened by anyone with a copy of WinZip
Does anyone have suggestions with components that they have used? Please feel free to suggest free as well as commercial components/libraries.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
也许 DelphiZip 就是您正在寻找的,它似乎也支持加密,并且与 WinZip 兼容。 它是在 LGPL 下发布的。
Perhaps DelphiZip is what you are looking for, it seems to support encryption, too, and is WinZip compatible. It is released under LGPL.
KaZip 是一个开源 ZIP 存档器。 这是它的描述:
它与 Delphi 2009 尚不兼容,但通过对源代码进行一些细微的更改,您也可以使其在 Delphi 2009 中运行 事实上,我就是这么做的。
问候
KaZip is an open-source ZIP archiver. Here is its description:
It is not compatible with Delphi 2009 yet, but with some minor changes in the source code, you can make it work in Delphi 2009 too. Actually, that's what I did.
Regards
我使用 madZip 来自 madCollection
I`m using madZip from madCollection
我很惊讶还没有人提到 JclCompression - 它是著名的 Jedi Code Library (JCL) 的一部分。
这是单元本身的视图: http://jcl.svn.sourceforge.net/viewvc/jcl/trunk/jcl/source/common/JclCompression.pas?view=markup
注意,它与 7-zip DLL 版本 4.64 - 更新版本兼容版本可能不向后兼容...
I'm surprised no-one has mentioned JclCompression yet - it's part of the well-known Jedi Code Library (JCL).
Here's a view of the unit itself : http://jcl.svn.sourceforge.net/viewvc/jcl/trunk/jcl/source/common/JclCompression.pas?view=markup
Note, it's compatible with 7-zip DLL version 4.64 - newer versions might not be backwards-compatible...
我推荐 ComponentAce 的 69 美元 ZipForge。
I recommend the $69 ZipForge from ComponentAce.
您可以使用 Pascal 的 7zip (LZMA) 绑定(与 Delphi 兼容): http://www.birtles .org.uk/programming/
You could use 7zip (LZMA) bindings for Pascal (compatible with Delphi): http://www.birtles.org.uk/programming/
另一个值得一看的 Delphi 资源是 InnoSetup。 源代码是可用的,只需做一点工作就可以让您在尝试做的事情上取得优势。 有一个选项可以创建与 WinZip 兼容的自解压 zip 存档,
我的想法不是使用该程序,而是使用他的源代码作为起点,因为它经过了严格的测试并且非常可靠。
Another Delphi resource to look at would be InnoSetup. The source code is available and with a little work might give you an edge up on what your trying to do. There is an option to create self extracting zip archives which are compatible with WinZip,
My thoughts are not to use the program, but to use his source as a starting point since it is very heavily tested and extremely solid.
有 infozips zip32 和 unzip32 dll。 它们可以在 Delphi(甚至 Visual Basic)中使用,两者都有接口单元/模块。 该界面不如我所希望的那么好,但它可以工作。
There are infozips zip32 and unzip32 dlls. They can be used from Delphi (even from Visual Basic), there are interface units/modules for both. The interface isn't as good as I would have liked it, but it works.