#pragma once #include struct buffer { char * data; int length; int offset; int next; int allocated; }; struct stream { int fd; struct buffer in; struct buffer out; }; int stream_push_new(lua_State *, const int); int stream_gc(lua_State *); int stream_read(lua_State *); int stream_readk(lua_State *, const int, lua_KContext); int stream_write(lua_State *); int stream_flush(lua_State *); int stream_flushk(lua_State *, const int, lua_KContext); int stream_discard(lua_State *);