rename bufio to membuf, add read/write varbytes
add object encode/decoder