cpacket => method unpack() resize allocated buffer when unpacking