JavaScript inflate implementation (possibly FF 3.6 only)

天大地大妈咪最大 提交于 2019-12-10 04:32:08

问题


I'm writing some scripts that are using the HTML 5 file API in FireFox 3.6. I got some deflated (compressed) files, and I need to inflate (uncompress) them.

I found a few scripts while googling, but none of them have tests. So I'm a bit reluctant to use them.

My question is: Browsers can inflate. Can I somehow piggyback on the inflation by forging A XHR request? Or piggyback in any other way? Keep in mind, the script is currently FireFox 3.6 exclusive. It can't be an extension, though, I want it to be a regular webpage.

Alternatively, are there any scripts that you know of that has tests written for it?


回答1:


I found an existing library. Wrote a test. Wrapped it in a function so that it didn't pollute the global namespace, that's about it.

http://github.com/augustl/js-inflate




回答2:


Update of my post is: http://pastie.org/1588170

-+-+-+-+-+-+-+-+-+-+

I use DEFLATE encoder and decoder implementation in Javascript at http://github.com/dankogai/js-deflate

I use Google's V8 Javascript engine (url ) on server side to run Javascript code which I run on client side in web browser.



来源:https://stackoverflow.com/questions/2171875/javascript-inflate-implementation-possibly-ff-3-6-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!