解压速度太慢

时间:2017-10-03 13:42:12

标签: ios reactjs react-native react-native-ios

我正在使用react-native-zip-archive来解压缩我的文件。

这是我的源代码。

            unzip(res.path(), targetPath)
              .then((path) => {
                RNFS.unlink(res.path())
                  .then(() => {
                    console.log('FILE DELETED');
                  })
                  // `unlink` will throw an error, if the item to unlink does not exist
                  .catch((err) => {
                    console.log(err.message);
                  });
              })
              .catch((error) => {
              });

Zip文件是235MB。提取它需要大约30分钟。 反正有提高提取速度吗?

感谢您的时间。

1 个答案:

答案 0 :(得分:0)

我建议你使用这个zip库。这很有用并且压缩得很好 pako