add length to write in unpack0()