add serialize buffer option, close #33