lua_dump
if (lua_dump(L, writer, &b) != 0)
LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data);