node-stream-zip大型 ZIPs 文件查看
node-stream-zip 是查看和提取大型 ZIP 文件的 Node.js 库。
特性:
-
从不加载完整的归档到内存,一切都是通过块读取
-
大型归档支持
-
所有操作都是非阻塞,非同步 i/o
-
快速初始化
-
无依赖,无二进制组件
-
内置 zlib 模块解压
-
deflate, deflate64, sfx, macosx/windows 内置归档
-
ZIP64 支持
安装
$ npm install node-stream-zip
使用
var StreamZip = require('node-stream-zip'); var zip = new StreamZip({ file: 'archive.zip', storeEntries: true }); zip.on('error', function(err) { /*handle*/ }); zip.on('ready', function() { console.log('Entries read: ' + zip.entriesCount); // stream to stdout zip.stream('node/benchmark/net/tcp-raw-c2s.js', function(err, stm) { stm.pipe(process.stdout); }); // extract file zip.extract('node/benchmark/net/tcp-raw-c2s.js', './temp/', function(err) { console.log('Entry extracted'); }); // extract folder zip.extract('node/benchmark/', './temp/', function(err, count) { console.log('Extracted ' + count + ' entries'); }); // extract all zip.extract(null, './temp/', function(err, count) { console.log('Extracted ' + count + ' entries'); }); // read file as buffer in sync way var data = zip.entryDataSync('README.md'); }); zip.on('extract', function(entry, file) { console.log('Extracted ' + entry.name + ' to ' + file); }); zip.on('entry', function(entry) { // called on load, when entry description has been read // you can already stream this entry, without waiting until all entry descriptions are read (suitable for very large archives) console.log('Read entry ', entry.name); });
评论
利用QuickLook查看文件
iOS自身带有快捷查看文件方式的框架,可以对一些常用资源文件进行查看,能够查看的文件格式包括图片,word,ppt,pdf等。Demo是读取和查看保存在设备Document文件夹的文件。[Code4A
利用QuickLook查看文件
0
GPX ViewerGPX文件查看软件
GPXViewer是一个用来查看GPX文件格式的软件,可以同时显示多个GPX文件。该软件可以显示路点、跟踪,高亮显示选中的路线,使用图表的方式显示速度和时间、距离、平均速度、最大速度,GPS信息;支持
GPX ViewerGPX文件查看软件
0
EDFbrowserEEG/EMG/ECG文件查看软件
EDFbrowser是一个支持多平台的EEG/EMG/ECG文件查看软件,支持的格式包括EDF,EDF+,BDF,BDF+,以及NihonKohden关于BDF格式的资料请看:http://www.t
EDFbrowserEEG/EMG/ECG文件查看软件
0
EDFbrowserEEG/EMG/ECG文件查看软件
EDFbrowser 是一个支持多平台的 EEG/EMG/ECG 文件查看软件,支持的格式包括 ED
EDFbrowserEEG/EMG/ECG文件查看软件
0