VB6/VBA 的 LZMA 压缩?
希望在我的 Access 2000 应用程序中使用 LZMA 压缩加密文件。有谁知道在 VB6/VBA 中执行此操作的最简单方法或知道任何源代码吗?
Looking to LZMA compress encrypted files in my Access 2000 application. Does anyone know the simplest way to do this in VB6/VBA or know of any source code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你说你想压缩加密文件?压缩加密文件通常不会节省太多空间,因为加密过程会扰乱压缩所处理的重复结构。所以我假设你的意思是压缩和加密文件。
有一个 7-zip lzma SDK 但你需要编译代码并工作了解如何将其转换为 Windows dll 或您可以使用的东西。
我建议您将任务推送到命令行,即
您不需要为此创建批处理文件,您可以直接提供命令。程序启动后,Shell 函数将立即返回,因此您需要等待并测试输出文件的出现,然后再尝试对其执行任何操作。
7-zip 是免费的,并提供您可以使用的命令行语法。
You say you want to compress encrypted files? Compressing encrypted files usually doesn't result in much space saving as the encryption process scrambles the repeating structures that compression works on. So I assume you mean compress and encrypt files.
There is a 7-zip lzma SDK but you'd need to compile the code and work out how to turn it into a windows dll or something you can use.
I suggest you just push the task out to a command line i.e.
You don't need to create a batch file for this, you could supply the command directly. The Shell function will return as soon as the program has launched, so you will need to wait and test for the output file to appear before you try and do anything with it.
7-zip is free and provides a command line syntax that you could use.
这个不是免费的,功能上可能有点过大(尽管您在问题中确实提到了加密;-):
CryptoSys - 购买
CryptoSys - 功能
也许,重要的功能之一CryptoSys的特点是它支持多种开发语言/平台,而不仅仅是VB6和VBA。
This one is not free and functionally might be an overkill (although you did mention encryption in your question ;-):
CryptoSys - Purchasing
CryptoSys - Features
Perhaps, one of the important traits of CryptoSys is that it supports several development languages/platforms, not just VB6 and VBA.
与 Stepen Turner 的答案类似,您可以使用 XZ Utils 页面 中的 xz.exe(请参阅 Windows 部分)。
代码将如下所示:
Similarly to Stepen Turner's answer, you could use xz.exe from the XZ Utils page (see Windows section).
The code would then look like this: