Use memcpy in unpack_data