BlackBerry - 解压 Zip 文件

发布于 2024-08-11 14:42:31 字数 557 浏览 4 评论 0原文

我正在开发一个 BlackBerry 应用程序,需要在其中解压使用 PKZIP 压缩的 zip 文件。该包中可以有 1 个文件,也可以有 10 个文件;每种情况都会有所不同。我知道 BlackBerry API 对 GZip 和 Zlib 具有本机支持,尽管我很确定这些方法对我的情况没有帮助。看起来我无法使用这些调用提取单个文件。

我尝试过 JZlib (http://www.jcraft.com/jzlib/),编译得很好,但同样看起来其中包含的方法不允许我提取单个文件。

看起来这是可能的,因为有一个名为 Ziplorer 的应用程序 (http://www.s4bb. com/software/ziplorer/),声称执行此确切过程。然而,我不明白他们是如何做到的。

经过几个小时的谷歌搜索后,我来到这里。我张开双臂欢迎任何对我的问题的见解。

I'm developing a BlackBerry application in which I need to unpack a zip file compressed with PKZIP. The package could have one file in it, or it could have 10; it will vary in each case. I know that the BlackBerry API has native support for GZip and Zlib, although I'm pretty sure that these methods aren't going to be helpful in my case. It doesn't look as if I can extract the individual files using these calls.

I've tried JZlib (http://www.jcraft.com/jzlib/), which compiled fine, but again it doesn't look as if the methods contained therein are going to allow me to pull the individual files.

It appears as if this is possible, as there's an application called Ziplorer (http://www.s4bb.com/software/ziplorer/) that claims to do perform this exact procedure. How they're doing it, however, escapes me.

So here I am after hours of Googling. I'm welcoming any insight into my problem with open arms.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风流物 2024-08-18 14:42:31

“zip”算法通常是 Lempel-Ziv-Welch 算法的分支。它们是相当有效的流压缩算法,但由于它们的功能,您无法在文件中的随机点开始解压缩,您必须从头开始。

任何声称能够从 zip 解压一个文件的产品仍然必须解压 zip 文件中该文件之前的所有内容,以便知道如何解密给定文件,甚至知道该文件在存档中的位置。

"zip" algorithms are typically offshoots of the Lempel-Ziv-Welch algorithm. They are a fairly efficient stream compression algorithms, but because of how they function, you can't start to decompress at random points in the file, you have to start from the start.

Any product that claims to be able to decompress one file from a zip still has to decompress everything before it in the zip file in order to know how to decrypt the given file, or even, for that matter, where the file is in the archive.

淡莣 2024-08-18 14:42:31

如果您可以容忍应用程序中的 GPL 代码,那么此库 http://jazzme.sourceforge.net/这可能有用。但是该项目(及其父项目 http://sourceforge.net/projects/jazzlib/)看起来不像正在开发。

If you can tolerate GPL code in your application, then this library http://jazzme.sourceforge.net/ that might work. However the project (and its parent project http://sourceforge.net/projects/jazzlib/) don't look like they're being developed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文