attempt to call global 'table_insert' (a nil value), at the up code output function.
Just looking at your code and the error... table_insert isn’t defined in the code. Did you mean table.insert(...) per Lua syntax? I hand-rolled FFI + zlib + C++ application before, so I was not familiar with ffizlib module- maybe this is a standard method? Please clarify