sc2ai 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/sc2ai/protocol/data.proto +2 -2
- data/data/sc2ai/protocol/debug.proto +1 -1
- data/data/sc2ai/protocol/raw.proto +6 -6
- data/data/sc2ai/protocol/sc2api.proto +1 -1
- data/data/sc2ai/protocol/ui.proto +1 -1
- data/{lib/docker_build → docker_build}/Dockerfile.ruby +2 -2
- data/lib/sc2ai/cli/ladderzip.rb +1 -1
- data/lib/sc2ai/player/debug.rb +4 -4
- data/lib/sc2ai/player/geo.rb +1 -0
- data/lib/sc2ai/protocol/common_pb.rb +266 -42
- data/lib/sc2ai/protocol/data_pb.rb +333 -192
- data/lib/sc2ai/protocol/debug_pb.rb +598 -233
- data/lib/sc2ai/protocol/query_pb.rb +304 -48
- data/lib/sc2ai/protocol/raw_pb.rb +955 -858
- data/lib/sc2ai/protocol/sc2api_pb.rb +2460 -512
- data/lib/sc2ai/protocol/score_pb.rb +152 -24
- data/lib/sc2ai/protocol/spatial_pb.rb +342 -54
- data/lib/sc2ai/protocol/ui_pb.rb +750 -256
- data/lib/sc2ai/version.rb +1 -1
- data/lib/templates/new/api/data.proto +2 -2
- data/lib/templates/new/api/debug.proto +1 -1
- data/lib/templates/new/api/raw.proto +6 -6
- data/lib/templates/new/api/sc2api.proto +1 -1
- data/lib/templates/new/api/ui.proto +1 -1
- data/lib/templates/new/run_example_match.rb.tt +1 -1
- data/sig/sc2ai.rbs +2 -2
- metadata +7 -7
- /data/{lib/docker_build → docker_build}/docker-compose-base-image.yml +0 -0
- /data/{lib/docker_build → docker_build}/docker-compose-ladderzip.yml +0 -0
@@ -127,20 +127,38 @@ module Api
|
|
127
127
|
# unexpected, so discard it and continue.
|
128
128
|
if !found
|
129
129
|
wire_type = tag & 0x7
|
130
|
+
|
131
|
+
unknown_bytes = +"".b
|
132
|
+
val = tag
|
133
|
+
while val != 0
|
134
|
+
byte = val & 0x7F
|
135
|
+
|
136
|
+
val >>= 7
|
137
|
+
# This drops the top bits,
|
138
|
+
# Otherwise, with a signed right shift,
|
139
|
+
# we get infinity one bits at the top
|
140
|
+
val &= (1 << 57) - 1
|
141
|
+
|
142
|
+
byte |= 0x80 if val != 0
|
143
|
+
unknown_bytes << byte
|
144
|
+
end
|
145
|
+
|
130
146
|
case wire_type
|
131
147
|
when 0
|
132
148
|
i = 0
|
133
149
|
while true
|
134
150
|
newbyte = buff.getbyte(index)
|
135
151
|
index += 1
|
136
|
-
break if newbyte.nil?
|
152
|
+
break if newbyte.nil?
|
153
|
+
unknown_bytes << newbyte
|
154
|
+
break if newbyte < 0x80
|
137
155
|
i += 1
|
138
156
|
break if i > 9
|
139
157
|
end
|
140
158
|
when 1
|
159
|
+
unknown_bytes << buff.byteslice(index, 8)
|
141
160
|
index += 8
|
142
161
|
when 2
|
143
|
-
## PULL_BYTES
|
144
162
|
value =
|
145
163
|
if (byte0 = buff.getbyte(index)) < 0x80
|
146
164
|
index += 1
|
@@ -196,15 +214,29 @@ module Api
|
|
196
214
|
raise "integer decoding error"
|
197
215
|
end
|
198
216
|
|
199
|
-
|
200
|
-
|
217
|
+
val = value
|
218
|
+
while val != 0
|
219
|
+
byte = val & 0x7F
|
220
|
+
|
221
|
+
val >>= 7
|
222
|
+
# This drops the top bits,
|
223
|
+
# Otherwise, with a signed right shift,
|
224
|
+
# we get infinity one bits at the top
|
225
|
+
val &= (1 << 57) - 1
|
201
226
|
|
202
|
-
|
227
|
+
byte |= 0x80 if val != 0
|
228
|
+
unknown_bytes << byte
|
229
|
+
end
|
230
|
+
|
231
|
+
unknown_bytes << buff.byteslice(index, value)
|
232
|
+
index += value
|
203
233
|
when 5
|
234
|
+
unknown_bytes << buff.byteslice(index, 4)
|
204
235
|
index += 4
|
205
236
|
else
|
206
237
|
raise "unknown wire type #{wire_type}"
|
207
238
|
end
|
239
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
208
240
|
return self if index >= len
|
209
241
|
## PULL_UINT64
|
210
242
|
tag =
|
@@ -594,7 +626,7 @@ module Api
|
|
594
626
|
|
595
627
|
buff
|
596
628
|
end
|
597
|
-
|
629
|
+
buff << @_unknown_fields if @_unknown_fields
|
598
630
|
buff
|
599
631
|
end
|
600
632
|
|
@@ -1232,20 +1264,38 @@ module Api
|
|
1232
1264
|
# unexpected, so discard it and continue.
|
1233
1265
|
if !found
|
1234
1266
|
wire_type = tag & 0x7
|
1267
|
+
|
1268
|
+
unknown_bytes = +"".b
|
1269
|
+
val = tag
|
1270
|
+
while val != 0
|
1271
|
+
byte = val & 0x7F
|
1272
|
+
|
1273
|
+
val >>= 7
|
1274
|
+
# This drops the top bits,
|
1275
|
+
# Otherwise, with a signed right shift,
|
1276
|
+
# we get infinity one bits at the top
|
1277
|
+
val &= (1 << 57) - 1
|
1278
|
+
|
1279
|
+
byte |= 0x80 if val != 0
|
1280
|
+
unknown_bytes << byte
|
1281
|
+
end
|
1282
|
+
|
1235
1283
|
case wire_type
|
1236
1284
|
when 0
|
1237
1285
|
i = 0
|
1238
1286
|
while true
|
1239
1287
|
newbyte = buff.getbyte(index)
|
1240
1288
|
index += 1
|
1241
|
-
break if newbyte.nil?
|
1289
|
+
break if newbyte.nil?
|
1290
|
+
unknown_bytes << newbyte
|
1291
|
+
break if newbyte < 0x80
|
1242
1292
|
i += 1
|
1243
1293
|
break if i > 9
|
1244
1294
|
end
|
1245
1295
|
when 1
|
1296
|
+
unknown_bytes << buff.byteslice(index, 8)
|
1246
1297
|
index += 8
|
1247
1298
|
when 2
|
1248
|
-
## PULL_BYTES
|
1249
1299
|
value =
|
1250
1300
|
if (byte0 = buff.getbyte(index)) < 0x80
|
1251
1301
|
index += 1
|
@@ -1301,15 +1351,29 @@ module Api
|
|
1301
1351
|
raise "integer decoding error"
|
1302
1352
|
end
|
1303
1353
|
|
1304
|
-
|
1305
|
-
|
1354
|
+
val = value
|
1355
|
+
while val != 0
|
1356
|
+
byte = val & 0x7F
|
1357
|
+
|
1358
|
+
val >>= 7
|
1359
|
+
# This drops the top bits,
|
1360
|
+
# Otherwise, with a signed right shift,
|
1361
|
+
# we get infinity one bits at the top
|
1362
|
+
val &= (1 << 57) - 1
|
1363
|
+
|
1364
|
+
byte |= 0x80 if val != 0
|
1365
|
+
unknown_bytes << byte
|
1366
|
+
end
|
1306
1367
|
|
1307
|
-
|
1368
|
+
unknown_bytes << buff.byteslice(index, value)
|
1369
|
+
index += value
|
1308
1370
|
when 5
|
1371
|
+
unknown_bytes << buff.byteslice(index, 4)
|
1309
1372
|
index += 4
|
1310
1373
|
else
|
1311
1374
|
raise "unknown wire type #{wire_type}"
|
1312
1375
|
end
|
1376
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
1313
1377
|
return self if index >= len
|
1314
1378
|
## PULL_UINT64
|
1315
1379
|
tag =
|
@@ -5730,7 +5794,7 @@ module Api
|
|
5730
5794
|
|
5731
5795
|
buff
|
5732
5796
|
end
|
5733
|
-
|
5797
|
+
buff << @_unknown_fields if @_unknown_fields
|
5734
5798
|
buff
|
5735
5799
|
end
|
5736
5800
|
|
@@ -6073,20 +6137,38 @@ module Api
|
|
6073
6137
|
# unexpected, so discard it and continue.
|
6074
6138
|
if !found
|
6075
6139
|
wire_type = tag & 0x7
|
6140
|
+
|
6141
|
+
unknown_bytes = +"".b
|
6142
|
+
val = tag
|
6143
|
+
while val != 0
|
6144
|
+
byte = val & 0x7F
|
6145
|
+
|
6146
|
+
val >>= 7
|
6147
|
+
# This drops the top bits,
|
6148
|
+
# Otherwise, with a signed right shift,
|
6149
|
+
# we get infinity one bits at the top
|
6150
|
+
val &= (1 << 57) - 1
|
6151
|
+
|
6152
|
+
byte |= 0x80 if val != 0
|
6153
|
+
unknown_bytes << byte
|
6154
|
+
end
|
6155
|
+
|
6076
6156
|
case wire_type
|
6077
6157
|
when 0
|
6078
6158
|
i = 0
|
6079
6159
|
while true
|
6080
6160
|
newbyte = buff.getbyte(index)
|
6081
6161
|
index += 1
|
6082
|
-
break if newbyte.nil?
|
6162
|
+
break if newbyte.nil?
|
6163
|
+
unknown_bytes << newbyte
|
6164
|
+
break if newbyte < 0x80
|
6083
6165
|
i += 1
|
6084
6166
|
break if i > 9
|
6085
6167
|
end
|
6086
6168
|
when 1
|
6169
|
+
unknown_bytes << buff.byteslice(index, 8)
|
6087
6170
|
index += 8
|
6088
6171
|
when 2
|
6089
|
-
## PULL_BYTES
|
6090
6172
|
value =
|
6091
6173
|
if (byte0 = buff.getbyte(index)) < 0x80
|
6092
6174
|
index += 1
|
@@ -6142,15 +6224,29 @@ module Api
|
|
6142
6224
|
raise "integer decoding error"
|
6143
6225
|
end
|
6144
6226
|
|
6145
|
-
|
6146
|
-
|
6227
|
+
val = value
|
6228
|
+
while val != 0
|
6229
|
+
byte = val & 0x7F
|
6230
|
+
|
6231
|
+
val >>= 7
|
6232
|
+
# This drops the top bits,
|
6233
|
+
# Otherwise, with a signed right shift,
|
6234
|
+
# we get infinity one bits at the top
|
6235
|
+
val &= (1 << 57) - 1
|
6147
6236
|
|
6148
|
-
|
6237
|
+
byte |= 0x80 if val != 0
|
6238
|
+
unknown_bytes << byte
|
6239
|
+
end
|
6240
|
+
|
6241
|
+
unknown_bytes << buff.byteslice(index, value)
|
6242
|
+
index += value
|
6149
6243
|
when 5
|
6244
|
+
unknown_bytes << buff.byteslice(index, 4)
|
6150
6245
|
index += 4
|
6151
6246
|
else
|
6152
6247
|
raise "unknown wire type #{wire_type}"
|
6153
6248
|
end
|
6249
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
6154
6250
|
return self if index >= len
|
6155
6251
|
## PULL_UINT64
|
6156
6252
|
tag =
|
@@ -7981,7 +8077,7 @@ module Api
|
|
7981
8077
|
|
7982
8078
|
buff
|
7983
8079
|
end
|
7984
|
-
|
8080
|
+
buff << @_unknown_fields if @_unknown_fields
|
7985
8081
|
buff
|
7986
8082
|
end
|
7987
8083
|
|
@@ -8125,20 +8221,38 @@ module Api
|
|
8125
8221
|
# unexpected, so discard it and continue.
|
8126
8222
|
if !found
|
8127
8223
|
wire_type = tag & 0x7
|
8224
|
+
|
8225
|
+
unknown_bytes = +"".b
|
8226
|
+
val = tag
|
8227
|
+
while val != 0
|
8228
|
+
byte = val & 0x7F
|
8229
|
+
|
8230
|
+
val >>= 7
|
8231
|
+
# This drops the top bits,
|
8232
|
+
# Otherwise, with a signed right shift,
|
8233
|
+
# we get infinity one bits at the top
|
8234
|
+
val &= (1 << 57) - 1
|
8235
|
+
|
8236
|
+
byte |= 0x80 if val != 0
|
8237
|
+
unknown_bytes << byte
|
8238
|
+
end
|
8239
|
+
|
8128
8240
|
case wire_type
|
8129
8241
|
when 0
|
8130
8242
|
i = 0
|
8131
8243
|
while true
|
8132
8244
|
newbyte = buff.getbyte(index)
|
8133
8245
|
index += 1
|
8134
|
-
break if newbyte.nil?
|
8246
|
+
break if newbyte.nil?
|
8247
|
+
unknown_bytes << newbyte
|
8248
|
+
break if newbyte < 0x80
|
8135
8249
|
i += 1
|
8136
8250
|
break if i > 9
|
8137
8251
|
end
|
8138
8252
|
when 1
|
8253
|
+
unknown_bytes << buff.byteslice(index, 8)
|
8139
8254
|
index += 8
|
8140
8255
|
when 2
|
8141
|
-
## PULL_BYTES
|
8142
8256
|
value =
|
8143
8257
|
if (byte0 = buff.getbyte(index)) < 0x80
|
8144
8258
|
index += 1
|
@@ -8194,15 +8308,29 @@ module Api
|
|
8194
8308
|
raise "integer decoding error"
|
8195
8309
|
end
|
8196
8310
|
|
8197
|
-
|
8198
|
-
|
8311
|
+
val = value
|
8312
|
+
while val != 0
|
8313
|
+
byte = val & 0x7F
|
8314
|
+
|
8315
|
+
val >>= 7
|
8316
|
+
# This drops the top bits,
|
8317
|
+
# Otherwise, with a signed right shift,
|
8318
|
+
# we get infinity one bits at the top
|
8319
|
+
val &= (1 << 57) - 1
|
8320
|
+
|
8321
|
+
byte |= 0x80 if val != 0
|
8322
|
+
unknown_bytes << byte
|
8323
|
+
end
|
8199
8324
|
|
8200
|
-
|
8325
|
+
unknown_bytes << buff.byteslice(index, value)
|
8326
|
+
index += value
|
8201
8327
|
when 5
|
8328
|
+
unknown_bytes << buff.byteslice(index, 4)
|
8202
8329
|
index += 4
|
8203
8330
|
else
|
8204
8331
|
raise "unknown wire type #{wire_type}"
|
8205
8332
|
end
|
8333
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
8206
8334
|
return self if index >= len
|
8207
8335
|
## PULL_UINT64
|
8208
8336
|
tag =
|
@@ -8584,7 +8712,7 @@ module Api
|
|
8584
8712
|
|
8585
8713
|
buff
|
8586
8714
|
end
|
8587
|
-
|
8715
|
+
buff << @_unknown_fields if @_unknown_fields
|
8588
8716
|
buff
|
8589
8717
|
end
|
8590
8718
|
|
@@ -8745,20 +8873,38 @@ module Api
|
|
8745
8873
|
# unexpected, so discard it and continue.
|
8746
8874
|
if !found
|
8747
8875
|
wire_type = tag & 0x7
|
8876
|
+
|
8877
|
+
unknown_bytes = +"".b
|
8878
|
+
val = tag
|
8879
|
+
while val != 0
|
8880
|
+
byte = val & 0x7F
|
8881
|
+
|
8882
|
+
val >>= 7
|
8883
|
+
# This drops the top bits,
|
8884
|
+
# Otherwise, with a signed right shift,
|
8885
|
+
# we get infinity one bits at the top
|
8886
|
+
val &= (1 << 57) - 1
|
8887
|
+
|
8888
|
+
byte |= 0x80 if val != 0
|
8889
|
+
unknown_bytes << byte
|
8890
|
+
end
|
8891
|
+
|
8748
8892
|
case wire_type
|
8749
8893
|
when 0
|
8750
8894
|
i = 0
|
8751
8895
|
while true
|
8752
8896
|
newbyte = buff.getbyte(index)
|
8753
8897
|
index += 1
|
8754
|
-
break if newbyte.nil?
|
8898
|
+
break if newbyte.nil?
|
8899
|
+
unknown_bytes << newbyte
|
8900
|
+
break if newbyte < 0x80
|
8755
8901
|
i += 1
|
8756
8902
|
break if i > 9
|
8757
8903
|
end
|
8758
8904
|
when 1
|
8905
|
+
unknown_bytes << buff.byteslice(index, 8)
|
8759
8906
|
index += 8
|
8760
8907
|
when 2
|
8761
|
-
## PULL_BYTES
|
8762
8908
|
value =
|
8763
8909
|
if (byte0 = buff.getbyte(index)) < 0x80
|
8764
8910
|
index += 1
|
@@ -8814,15 +8960,29 @@ module Api
|
|
8814
8960
|
raise "integer decoding error"
|
8815
8961
|
end
|
8816
8962
|
|
8817
|
-
|
8818
|
-
|
8963
|
+
val = value
|
8964
|
+
while val != 0
|
8965
|
+
byte = val & 0x7F
|
8819
8966
|
|
8820
|
-
|
8967
|
+
val >>= 7
|
8968
|
+
# This drops the top bits,
|
8969
|
+
# Otherwise, with a signed right shift,
|
8970
|
+
# we get infinity one bits at the top
|
8971
|
+
val &= (1 << 57) - 1
|
8972
|
+
|
8973
|
+
byte |= 0x80 if val != 0
|
8974
|
+
unknown_bytes << byte
|
8975
|
+
end
|
8976
|
+
|
8977
|
+
unknown_bytes << buff.byteslice(index, value)
|
8978
|
+
index += value
|
8821
8979
|
when 5
|
8980
|
+
unknown_bytes << buff.byteslice(index, 4)
|
8822
8981
|
index += 4
|
8823
8982
|
else
|
8824
8983
|
raise "unknown wire type #{wire_type}"
|
8825
8984
|
end
|
8985
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
8826
8986
|
return self if index >= len
|
8827
8987
|
## PULL_UINT64
|
8828
8988
|
tag =
|
@@ -9542,7 +9702,7 @@ module Api
|
|
9542
9702
|
|
9543
9703
|
buff
|
9544
9704
|
end
|
9545
|
-
|
9705
|
+
buff << @_unknown_fields if @_unknown_fields
|
9546
9706
|
buff
|
9547
9707
|
end
|
9548
9708
|
|
@@ -9728,20 +9888,38 @@ module Api
|
|
9728
9888
|
# unexpected, so discard it and continue.
|
9729
9889
|
if !found
|
9730
9890
|
wire_type = tag & 0x7
|
9891
|
+
|
9892
|
+
unknown_bytes = +"".b
|
9893
|
+
val = tag
|
9894
|
+
while val != 0
|
9895
|
+
byte = val & 0x7F
|
9896
|
+
|
9897
|
+
val >>= 7
|
9898
|
+
# This drops the top bits,
|
9899
|
+
# Otherwise, with a signed right shift,
|
9900
|
+
# we get infinity one bits at the top
|
9901
|
+
val &= (1 << 57) - 1
|
9902
|
+
|
9903
|
+
byte |= 0x80 if val != 0
|
9904
|
+
unknown_bytes << byte
|
9905
|
+
end
|
9906
|
+
|
9731
9907
|
case wire_type
|
9732
9908
|
when 0
|
9733
9909
|
i = 0
|
9734
9910
|
while true
|
9735
9911
|
newbyte = buff.getbyte(index)
|
9736
9912
|
index += 1
|
9737
|
-
break if newbyte.nil?
|
9913
|
+
break if newbyte.nil?
|
9914
|
+
unknown_bytes << newbyte
|
9915
|
+
break if newbyte < 0x80
|
9738
9916
|
i += 1
|
9739
9917
|
break if i > 9
|
9740
9918
|
end
|
9741
9919
|
when 1
|
9920
|
+
unknown_bytes << buff.byteslice(index, 8)
|
9742
9921
|
index += 8
|
9743
9922
|
when 2
|
9744
|
-
## PULL_BYTES
|
9745
9923
|
value =
|
9746
9924
|
if (byte0 = buff.getbyte(index)) < 0x80
|
9747
9925
|
index += 1
|
@@ -9797,15 +9975,29 @@ module Api
|
|
9797
9975
|
raise "integer decoding error"
|
9798
9976
|
end
|
9799
9977
|
|
9800
|
-
|
9801
|
-
|
9978
|
+
val = value
|
9979
|
+
while val != 0
|
9980
|
+
byte = val & 0x7F
|
9981
|
+
|
9982
|
+
val >>= 7
|
9983
|
+
# This drops the top bits,
|
9984
|
+
# Otherwise, with a signed right shift,
|
9985
|
+
# we get infinity one bits at the top
|
9986
|
+
val &= (1 << 57) - 1
|
9802
9987
|
|
9803
|
-
|
9988
|
+
byte |= 0x80 if val != 0
|
9989
|
+
unknown_bytes << byte
|
9990
|
+
end
|
9991
|
+
|
9992
|
+
unknown_bytes << buff.byteslice(index, value)
|
9993
|
+
index += value
|
9804
9994
|
when 5
|
9995
|
+
unknown_bytes << buff.byteslice(index, 4)
|
9805
9996
|
index += 4
|
9806
9997
|
else
|
9807
9998
|
raise "unknown wire type #{wire_type}"
|
9808
9999
|
end
|
10000
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
9809
10001
|
return self if index >= len
|
9810
10002
|
## PULL_UINT64
|
9811
10003
|
tag =
|
@@ -10397,7 +10589,7 @@ module Api
|
|
10397
10589
|
else
|
10398
10590
|
raise "bool values should be true or false"
|
10399
10591
|
end
|
10400
|
-
|
10592
|
+
buff << @_unknown_fields if @_unknown_fields
|
10401
10593
|
buff
|
10402
10594
|
end
|
10403
10595
|
|
@@ -10514,20 +10706,38 @@ module Api
|
|
10514
10706
|
# unexpected, so discard it and continue.
|
10515
10707
|
if !found
|
10516
10708
|
wire_type = tag & 0x7
|
10709
|
+
|
10710
|
+
unknown_bytes = +"".b
|
10711
|
+
val = tag
|
10712
|
+
while val != 0
|
10713
|
+
byte = val & 0x7F
|
10714
|
+
|
10715
|
+
val >>= 7
|
10716
|
+
# This drops the top bits,
|
10717
|
+
# Otherwise, with a signed right shift,
|
10718
|
+
# we get infinity one bits at the top
|
10719
|
+
val &= (1 << 57) - 1
|
10720
|
+
|
10721
|
+
byte |= 0x80 if val != 0
|
10722
|
+
unknown_bytes << byte
|
10723
|
+
end
|
10724
|
+
|
10517
10725
|
case wire_type
|
10518
10726
|
when 0
|
10519
10727
|
i = 0
|
10520
10728
|
while true
|
10521
10729
|
newbyte = buff.getbyte(index)
|
10522
10730
|
index += 1
|
10523
|
-
break if newbyte.nil?
|
10731
|
+
break if newbyte.nil?
|
10732
|
+
unknown_bytes << newbyte
|
10733
|
+
break if newbyte < 0x80
|
10524
10734
|
i += 1
|
10525
10735
|
break if i > 9
|
10526
10736
|
end
|
10527
10737
|
when 1
|
10738
|
+
unknown_bytes << buff.byteslice(index, 8)
|
10528
10739
|
index += 8
|
10529
10740
|
when 2
|
10530
|
-
## PULL_BYTES
|
10531
10741
|
value =
|
10532
10742
|
if (byte0 = buff.getbyte(index)) < 0x80
|
10533
10743
|
index += 1
|
@@ -10583,15 +10793,29 @@ module Api
|
|
10583
10793
|
raise "integer decoding error"
|
10584
10794
|
end
|
10585
10795
|
|
10586
|
-
|
10587
|
-
|
10796
|
+
val = value
|
10797
|
+
while val != 0
|
10798
|
+
byte = val & 0x7F
|
10799
|
+
|
10800
|
+
val >>= 7
|
10801
|
+
# This drops the top bits,
|
10802
|
+
# Otherwise, with a signed right shift,
|
10803
|
+
# we get infinity one bits at the top
|
10804
|
+
val &= (1 << 57) - 1
|
10805
|
+
|
10806
|
+
byte |= 0x80 if val != 0
|
10807
|
+
unknown_bytes << byte
|
10808
|
+
end
|
10588
10809
|
|
10589
|
-
|
10810
|
+
unknown_bytes << buff.byteslice(index, value)
|
10811
|
+
index += value
|
10590
10812
|
when 5
|
10813
|
+
unknown_bytes << buff.byteslice(index, 4)
|
10591
10814
|
index += 4
|
10592
10815
|
else
|
10593
10816
|
raise "unknown wire type #{wire_type}"
|
10594
10817
|
end
|
10818
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
10595
10819
|
return self if index >= len
|
10596
10820
|
## PULL_UINT64
|
10597
10821
|
tag =
|
@@ -10812,7 +11036,7 @@ module Api
|
|
10812
11036
|
|
10813
11037
|
buff
|
10814
11038
|
end
|
10815
|
-
|
11039
|
+
buff << @_unknown_fields if @_unknown_fields
|
10816
11040
|
buff
|
10817
11041
|
end
|
10818
11042
|
|
@@ -10979,20 +11203,38 @@ module Api
|
|
10979
11203
|
# unexpected, so discard it and continue.
|
10980
11204
|
if !found
|
10981
11205
|
wire_type = tag & 0x7
|
11206
|
+
|
11207
|
+
unknown_bytes = +"".b
|
11208
|
+
val = tag
|
11209
|
+
while val != 0
|
11210
|
+
byte = val & 0x7F
|
11211
|
+
|
11212
|
+
val >>= 7
|
11213
|
+
# This drops the top bits,
|
11214
|
+
# Otherwise, with a signed right shift,
|
11215
|
+
# we get infinity one bits at the top
|
11216
|
+
val &= (1 << 57) - 1
|
11217
|
+
|
11218
|
+
byte |= 0x80 if val != 0
|
11219
|
+
unknown_bytes << byte
|
11220
|
+
end
|
11221
|
+
|
10982
11222
|
case wire_type
|
10983
11223
|
when 0
|
10984
11224
|
i = 0
|
10985
11225
|
while true
|
10986
11226
|
newbyte = buff.getbyte(index)
|
10987
11227
|
index += 1
|
10988
|
-
break if newbyte.nil?
|
11228
|
+
break if newbyte.nil?
|
11229
|
+
unknown_bytes << newbyte
|
11230
|
+
break if newbyte < 0x80
|
10989
11231
|
i += 1
|
10990
11232
|
break if i > 9
|
10991
11233
|
end
|
10992
11234
|
when 1
|
11235
|
+
unknown_bytes << buff.byteslice(index, 8)
|
10993
11236
|
index += 8
|
10994
11237
|
when 2
|
10995
|
-
## PULL_BYTES
|
10996
11238
|
value =
|
10997
11239
|
if (byte0 = buff.getbyte(index)) < 0x80
|
10998
11240
|
index += 1
|
@@ -11048,15 +11290,29 @@ module Api
|
|
11048
11290
|
raise "integer decoding error"
|
11049
11291
|
end
|
11050
11292
|
|
11051
|
-
|
11052
|
-
|
11293
|
+
val = value
|
11294
|
+
while val != 0
|
11295
|
+
byte = val & 0x7F
|
11296
|
+
|
11297
|
+
val >>= 7
|
11298
|
+
# This drops the top bits,
|
11299
|
+
# Otherwise, with a signed right shift,
|
11300
|
+
# we get infinity one bits at the top
|
11301
|
+
val &= (1 << 57) - 1
|
11053
11302
|
|
11054
|
-
|
11303
|
+
byte |= 0x80 if val != 0
|
11304
|
+
unknown_bytes << byte
|
11305
|
+
end
|
11306
|
+
|
11307
|
+
unknown_bytes << buff.byteslice(index, value)
|
11308
|
+
index += value
|
11055
11309
|
when 5
|
11310
|
+
unknown_bytes << buff.byteslice(index, 4)
|
11056
11311
|
index += 4
|
11057
11312
|
else
|
11058
11313
|
raise "unknown wire type #{wire_type}"
|
11059
11314
|
end
|
11315
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
11060
11316
|
return self if index >= len
|
11061
11317
|
## PULL_UINT64
|
11062
11318
|
tag =
|
@@ -11415,7 +11671,7 @@ module Api
|
|
11415
11671
|
buff << byte
|
11416
11672
|
end
|
11417
11673
|
end
|
11418
|
-
|
11674
|
+
buff << @_unknown_fields if @_unknown_fields
|
11419
11675
|
buff
|
11420
11676
|
end
|
11421
11677
|
|
@@ -11540,20 +11796,38 @@ module Api
|
|
11540
11796
|
# unexpected, so discard it and continue.
|
11541
11797
|
if !found
|
11542
11798
|
wire_type = tag & 0x7
|
11799
|
+
|
11800
|
+
unknown_bytes = +"".b
|
11801
|
+
val = tag
|
11802
|
+
while val != 0
|
11803
|
+
byte = val & 0x7F
|
11804
|
+
|
11805
|
+
val >>= 7
|
11806
|
+
# This drops the top bits,
|
11807
|
+
# Otherwise, with a signed right shift,
|
11808
|
+
# we get infinity one bits at the top
|
11809
|
+
val &= (1 << 57) - 1
|
11810
|
+
|
11811
|
+
byte |= 0x80 if val != 0
|
11812
|
+
unknown_bytes << byte
|
11813
|
+
end
|
11814
|
+
|
11543
11815
|
case wire_type
|
11544
11816
|
when 0
|
11545
11817
|
i = 0
|
11546
11818
|
while true
|
11547
11819
|
newbyte = buff.getbyte(index)
|
11548
11820
|
index += 1
|
11549
|
-
break if newbyte.nil?
|
11821
|
+
break if newbyte.nil?
|
11822
|
+
unknown_bytes << newbyte
|
11823
|
+
break if newbyte < 0x80
|
11550
11824
|
i += 1
|
11551
11825
|
break if i > 9
|
11552
11826
|
end
|
11553
11827
|
when 1
|
11828
|
+
unknown_bytes << buff.byteslice(index, 8)
|
11554
11829
|
index += 8
|
11555
11830
|
when 2
|
11556
|
-
## PULL_BYTES
|
11557
11831
|
value =
|
11558
11832
|
if (byte0 = buff.getbyte(index)) < 0x80
|
11559
11833
|
index += 1
|
@@ -11609,15 +11883,29 @@ module Api
|
|
11609
11883
|
raise "integer decoding error"
|
11610
11884
|
end
|
11611
11885
|
|
11612
|
-
|
11613
|
-
|
11886
|
+
val = value
|
11887
|
+
while val != 0
|
11888
|
+
byte = val & 0x7F
|
11889
|
+
|
11890
|
+
val >>= 7
|
11891
|
+
# This drops the top bits,
|
11892
|
+
# Otherwise, with a signed right shift,
|
11893
|
+
# we get infinity one bits at the top
|
11894
|
+
val &= (1 << 57) - 1
|
11895
|
+
|
11896
|
+
byte |= 0x80 if val != 0
|
11897
|
+
unknown_bytes << byte
|
11898
|
+
end
|
11614
11899
|
|
11615
|
-
|
11900
|
+
unknown_bytes << buff.byteslice(index, value)
|
11901
|
+
index += value
|
11616
11902
|
when 5
|
11903
|
+
unknown_bytes << buff.byteslice(index, 4)
|
11617
11904
|
index += 4
|
11618
11905
|
else
|
11619
11906
|
raise "unknown wire type #{wire_type}"
|
11620
11907
|
end
|
11908
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
11621
11909
|
return self if index >= len
|
11622
11910
|
## PULL_UINT64
|
11623
11911
|
tag =
|
@@ -11938,7 +12226,7 @@ module Api
|
|
11938
12226
|
else
|
11939
12227
|
raise "bool values should be true or false"
|
11940
12228
|
end
|
11941
|
-
|
12229
|
+
buff << @_unknown_fields if @_unknown_fields
|
11942
12230
|
buff
|
11943
12231
|
end
|
11944
12232
|
|