#include "gats/integer.h" #include #include using namespace Bu; int main() { MemBuf mb; int64_t i = -6; sio << "Before: " << i << sio.nl; Gats::Integer::writePackedInt( mb, i ); mb.write("aaa", 3 ); mb.setPos( 0 ); Gats::Integer::readPackedInt( mb, i ); sio << "After: " << i << sio.nl; char buf[4]; buf[mb.read( buf, 3 )] = '\0'; sio << "Extra: \"" << buf << "\"" << sio.nl; return 0; }