public ZlibModule() {
super("zlib");
}
@Override
public void initBindings() {
NClassType Compress = newClass("Compress", table, Object);
for (String s : list("compress", "flush")) {
Compress.getTable().update(s, newLibUrl("zlib"), BaseStr, METHOD);
}
Compress.getTable().update("copy", newLibUrl("zlib"), Compress, METHOD);
addClass("Compress", liburl(), Compress);
NClassType Decompress = newClass("Decompress", table, Object);
for (String s : list("unused_data", "unconsumed_tail")) {
Decompress.getTable().update(s, newLibUrl("zlib"), BaseStr, ATTRIBUTE);
}
for (String s : list("decompress", "flush")) {
Decompress.getTable().update(s, newLibUrl("zlib"), BaseStr, METHOD);
}
Decompress.getTable().update("copy", newLibUrl("zlib"), Decompress, METHOD);
addClass("Decompress", liburl(), Decompress);
addFunction("adler32", liburl(), BaseNum);
addFunction("compress", liburl(), BaseStr);
addFunction("compressobj", liburl(), Compress);