1.0.8 • Published 5 years ago

zip-comment v1.0.8

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

介绍

该库仅用于读取 zip 压缩包中的注释,并不能用于读取 zip 中每个文件的注释

该库的实现参考:jszip

功能

  1. 读取 utf8 注释
  2. 读取 utf16 注释
  3. 读取加密 zip 包的注释

特性

  1. 体积小

TODO

  1. 兼容性测试
  2. 处理 zip64 文件中的注释
  3. 处理 zip 压缩包中每个文件的注释

安装

npm i zip-comment

使用

  1. 直接在浏览器使用
<body>
    <input type="file" onchange="selectFile(event)">
    <script src="../dist/bundle.umd.js"></script>
    <script>
        async function selectFile(event) {
            let file = event.target.files[0];
            let comment = await loadZipAsync(file);
            console.info(comment);
        }
    </script>
</body>
  1. import 导入使用
import loadZipAsync from 'zip-comment';
loadZipAsync(file)
    .then(comment => {
        console.info(comment);
    });
  1. require 导入使用
var { loadZipAsync } = require('zip-comment');
loadZipAsync(file)
    .then(comment => {
        console.info(comment);
    });
1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago