解压速度太慢

Ego*_*r T 7 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) => {
              });
Run Code Online (Sandbox Code Playgroud)

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

谢谢你的时间.

Tho*_*lin 0

我建议你使用这个 zip 库。这是有用且压缩良好的 pako