func encode_door(t *testing.T, wr *stream.Stream) {
	wr.SetSize(0)
	wr.Seek(0, 0)
	e := binutil.NewProtobufEncoder(wr)
	door := comp
	e.PutInt32(1, door.I32)
	e.PutInt64(2, door.I64)
	e.PutSint32(3, door.S32)
	e.PutSint64(4, door.S64)
	e.PutSfixed32(5, door.D32)
	e.PutSfixed64(6, door.D64)
	e.PutUint32(10, door.U32)
	e.PutUint64(11, door.U64)
	e.PutFixed32(12, door.X32)
	e.PutFixed64(13, door.X64)
	e.PutFloat32(20, door.F32)
	e.PutFloat64(21, door.F64)
	e.PutBool(30, door.B)
	e.PutString(31, door.S)
	e.PutEnum(32, door.E)
	encode_pos(dm, &door.Poslist[0])
	e.PutBytes(40, dm.Buf()[:dm.Position()])
	encode_pos(dm, &door.Poslist[1])
	e.PutBytes(40, dm.Buf()[:dm.Position()])
}
func encode_pos(wr *stream.Stream, pos *pbPos) {
	wr.SetSize(0)
	wr.Seek(0, 0)
	e := binutil.NewProtobufEncoder(wr)
	e.PutInt32(1, pos.X)
	e.PutInt32(2, pos.Y)
}