Variable sized C++ buffer with arbitrary type serialization.