lua_bufflib is a library that provides string buffers for Lua 5.1 and 5.2. The buffer code is largely based on Lua 5.2's luaL_Buffer code.
lua_bufflib can be installed through LuaRocks using luarocks install lua_bufflib
. You can also run luarocks make
on a downloaded and unpacked zip/tarball.
On Unix systems, you can run the included build.sh script, which compiles the library using libtool. This probably won't work in Cygwin or MinGW.
I've included a Visual Studio 2012 solution that can be used to compile the library on Windows. The solution includes predefined configurations for Lua 5.1, 5.2 and LuaJIT; but you may need to change the include directories (Properties > C/C++ > General > Additional Include Directories) and the Lua import library path (Properties > Linker > Input > Additional Dependencies) to match your setup.
Documentation can be found here