[update] use unsafe to get/write bytes