I am integrating flashzlib into one of my flash project. As mentioned in documentation of project. I have successfully generated libz.a and z.l.bc and pushed libs and headers in appropriate places.
Now, I have written this small wrapper https://gist.github.com/65d3c7ff683b326ecd22. This compiles just fine using:
gcc example1_as3.c -lz -O3 -Wall -swc -o example.swc
This is included into flash project like this (uncompressedData is a byteArray):
private var loader:CLibInit = new CLibInit;
private var lib:Object = loader.init();
logger.info("B : " + lib.returnString(uncompressedData, uncompressedData.length) + "");
But flash file fails at this last line. Am not sure what am i missing. z.l.bc file is 340KB while example.swc is just 80KB.