Add pack_chat and unpack_chat methods to Buffer