在JavaScript中解压缩字符串 [英] unzip strings in javascript

查看:165
本文介绍了在JavaScript中解压缩字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道一个简单的JavaScript库实现UNZIP算法?
没有磁盘文件访问,只能压缩和解压缩一串值。



有ActiveX,使用WinZIP和其他客户端相关的ZIP软件,写入JS。但是没有纯粹的JavaScript算法实现。



我会用它在GMap对象(谷歌地图)的HTML页面中显示KMZ文件。 KMZ文件只是一个压缩的KML文件。我想解压缩一个KMZ文件并将KML文件提供给GMap。 无需将KMZ文件解压缩为 Google地图绝对了解它您可以检查它,只需在 Google地图网络界面中搜索您的KMZ文件所在的网址,即可显示其内容在地图上。



下面是一个演示


Anyone knows a simple JavaScript library implementing the UNZIP algorithm? No disk-file access, only zip and unzip a string of values.

There are ActiveX, using WinZIP and other client dependent software for ZIP, written in JS. But no pure JavaScript algorithm implementation.

I would use it for displaying KMZ files in a HTML page with the GMap object (google maps). The KMZ file is just a zipped KML file. I want to unzip a KMZ file and feed the KML to GMap.

解决方案

No need to unzip the KMZ file as Google Maps absolutely understands it. You can check it, simply search for the URL where your KMZ file is located in the Google Maps web interface and it will show its content on the map.

Here is a demo.

这篇关于在JavaScript中解压缩字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆