zlib库不能用么?

cocoscreator1.4中使用zlib库,代码如下:

var zlib = require(‘zlib’);

模拟器报错:
Simulator: 1857:mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

安卓上黑屏,报错:
[[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

请问zlib不能使用么?还是有其他替代的压缩解压方案,我们进行websocket开发,需要对数据进行压缩解压。谢谢!

没有人在creator中使用过zlib么?

我一般都是写到C里面用lua调用。。

cocoscreator里面怎么调用,可以使用lua开发么?

不好吧 cocoscreator不是支持js更好一点嘛,c++的方法js应该也是可以绑定出来的

这是一个 warning,报错应该是别的

对,是个警告,但是打包成安卓apk后,安装到手机,也报这个,然后手机就是黑屏了,您可以在cocoscreator的任意js里写一句var zlib = require(‘zlib’);
然后打包apk,看是否黑屏,我们这边百分之百会黑屏

1赞

应该是其它报错引起的。