使用javascript列出tar文件的内容

使用javascript列出tar文件的内容,javascript,jsp,Javascript,Jsp,我有一个jsp文件,其中我正在用javascript编写一个函数,该函数以tar文件名作为参数,并返回tar文件包含的文件名列表。。怎么做呢?你试过使用吗?它的开源js库就是为了这个 编辑: 为清晰起见,提供使用示例 function updateProgressBar(e) { ... update UI element ... } function displayZipContents(e) { ... display contents of the file ... } var unzi

我有一个jsp文件,其中我正在用javascript编写一个函数,该函数以tar文件名作为参数,并返回tar文件包含的文件名列表。。怎么做呢?

你试过使用吗?它的开源js库就是为了这个

编辑: 为清晰起见,提供使用示例

function updateProgressBar(e) { ... update UI element ... }
function displayZipContents(e) { ... display contents of the file ... }

var unzipper = new bitjs.archive.Unzipper(zipFileArrayBuffer);
unzipper.addEventListener("progress", updateProgressBar);
unzipper.addEventListener("finish", displayZipContents);
unzipper.start();

更多信息

虽然此链接可以回答问题,但最好在此处包含答案的基本部分,并提供链接供参考。如果链接页面发生更改,则仅链接答案可能无效。根据@JqueryKing建议添加了用法示例和其他信息源。