add PB reader/writer util; add test example