Flash ActionScript 2 的压缩和解压缩工具

发布于 2024-07-21 08:47:18 字数 252 浏览 5 评论 0原文

您是否知道 flash / actionscript 2 的任何 zip/unzip 组件或脚本?

我知道这个库用于flex / AS3,但是有一个 AS2 可以让我省去漫长的转换尝试吗?

是否有这样的库支持创建/解析受密码保护的 zip 文件?

Are you aware of any zip/unzip component or script for flash / actionscript 2 ?

I'm aware of this library for flex / AS3, but is there one for AS2 that will save me a long conversion attempt?

Is there such a library that supports creating/parsing password protected zip files?

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

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

发布评论

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

评论(2

梦回旧景 2024-07-28 08:47:18

基本上可以做到......但会很慢......

http://code.google. com/p/hxformat/

实际上,您将加载字符串,然后将其解码为字节数组(使用 Bytes.ofString)...这将花费很多时间...并且您将我想,无法对结果做很多事情,因为 AS2 api 非常有限......

您将需要 Haxe,它是一种开源语言,它允许您针对许多平台,其中之一是 AVM1 。 .. 只需访问 haxe.org ... 并找到一个合适的 IDE 来编译代码 ...

问题是,编译代码很容易,但您可能很难使用结果,因为 Haxe-> swc 仅适用于 AVM2 ...但是有多种解决方案...

无论如何...如果可能的话,您应该将代码移植到 AS3,正如 fenomas 所建议的那样...AS2 确实过时了,因为语言和目标都是更差的较慢的 VM 和更小的 API ...此外,还有更多的 AS3 库 ...只是我个人的意见 ...

好吧,无论如何祝你好运 ...;)

basically it can be done ... but will be slow ...

http://code.google.com/p/hxformat/

actually you would load the string and then it'll be decoded into an Array of bytes (using Bytes.ofString) ... this will take a lot of time ... and you will not be able to do a lot with the results, i guess, since AS2 api is very limited ...

you will need Haxe, which is an open source language, that allows you to target lots of platforms, one of which is AVM1 ... just go to haxe.org ... and find a suitable IDE to get things compiled ...

problem is, it will be easy compiling the code, but you may have a hard time using the outcome, since Haxe->swc only works for AVM2 ... but there are multiple solutions for that ...

anyway ... if possible, you should port your code to AS3, as fenomas suggested ... AS2 is really outdated, poorer as language and target's a slower VM and a much smaller API ... also, there is a lot more AS3 libs out there ... just my personal opinion ...

well, good luck anyway ... ;)

離殇 2024-07-28 08:47:18

我不能明确地说,但我认为这种库在 AS2 中是不可能的。 如果没有 ByteArrays,你就无法对数据进行二进制访问,所以我能想象的唯一方法是一些令人难以置信的黑客行为,比如以位图形式读取文件并使用 getPixel 和 setPixel 调整其位 - 这个想法令人难以置信。

我认为你唯一真正的选择是:

  1. 将你的代码移植到 AS3 并使用你链接的库
  2. 通过 LocalConnection 桥将你的 AS2 代码与 AS3 库一起使用(这很毛茸茸,但是这里有几个主题)
  3. 在 Flash 之外进行压缩(例如,在 PHP 的服务器端等)

I can't say anything definitively, but I don't think this kind of library is possible in AS2. Without ByteArrays you have no binary access to data to begin with, so the only approach I can imagine is something unbelievably hackish, like reading the file in as a Bitmap and adjusting its bits with getPixel and setPixel - the mind boggles at the thought.

I think your only real options here are:

  1. to port your code to AS3 and use the library you linked
  2. Use your AS2 code with the AS3 library, via a LocalConnection bridge (this is hairy, but there are several topics on it here at SO)
  3. Do your zipping outside of Flash (for example, on the server side in PHP, etc.)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文