1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include "gats/integer.h" #include <bu/sio.h> #include <bu/membuf.h> using namespace Bu; int main() { MemBuf mb; int64_t i = -53954321995838ll; sio << "Before: " << i << sio.nl; Gats::Integer::writePackedInt( mb, i ); mb.setPos( 0 ); Gats::Integer::readPackedInt( mb, i ); sio << "After: " << i << sio.nl; return 0; }