纯 JavaScript 实现的 RAR 压缩文件浏览库:rar.js

jopen 10年前

rar.js提供了一个RAR格式的纯javascript实现,允许你在客户端和服务器端提取或操纵打包数据。

它支持多种输入:AJAX, File API (HTML5) 和 local disk (NodeJS)。

rar.js 用到了 dataview-extrareader.js

  • Large file support (currently the entire file will be in memory when RarArchive.get is called)
  • Decompression support
  • Encryption support
  • Recognise volumes/split archives
  • Parse other entries (e.g. comments)

示例代码:

var archive = RarArchive(file, function(err) {      if(err) {          // An error occurred (not a rar, read error, etc)          return;      }      // Use archive  });

项目主页:http://www.open-open.com/lib/view/home/1384088468399