Flash ActionScript 2 的压缩和解压缩工具
您是否知道 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
基本上可以做到......但会很慢......
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 ... ;)
我不能明确地说,但我认为这种库在 AS2 中是不可能的。 如果没有 ByteArrays,你就无法对数据进行二进制访问,所以我能想象的唯一方法是一些令人难以置信的黑客行为,比如以位图形式读取文件并使用 getPixel 和 setPixel 调整其位 - 这个想法令人难以置信。
我认为你唯一真正的选择是:
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: