求组帖:zlib库问题

我想对服务器传过来的数据解压缩,在工程目录使用npm install zlib 会报错,具体原因是找不到"./zlib_bindings"文件编辑器报错,看了一下下载下来的包确实没有。这时候我去下载了zlibt2,这个库可以正常导入,编辑器没有报错,当我new Inflate的时候,提示说Inflate is not a constructor,我看了一下下载的文件也有这个类,为什么会new不出来。求组,或许有没有其它的方法可以解压缩数据。

https://cocos.github.io/cocos-can-i-use-npm/
点进pako

感谢!这个可以用