sc2ai 0.4.2 → 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 +3 -3
- 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
- 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
data/lib/sc2ai/protocol/ui_pb.rb
CHANGED
@@ -164,20 +164,38 @@ module Api
|
|
164
164
|
# unexpected, so discard it and continue.
|
165
165
|
if !found
|
166
166
|
wire_type = tag & 0x7
|
167
|
+
|
168
|
+
unknown_bytes = +"".b
|
169
|
+
val = tag
|
170
|
+
while val != 0
|
171
|
+
byte = val & 0x7F
|
172
|
+
|
173
|
+
val >>= 7
|
174
|
+
# This drops the top bits,
|
175
|
+
# Otherwise, with a signed right shift,
|
176
|
+
# we get infinity one bits at the top
|
177
|
+
val &= (1 << 57) - 1
|
178
|
+
|
179
|
+
byte |= 0x80 if val != 0
|
180
|
+
unknown_bytes << byte
|
181
|
+
end
|
182
|
+
|
167
183
|
case wire_type
|
168
184
|
when 0
|
169
185
|
i = 0
|
170
186
|
while true
|
171
187
|
newbyte = buff.getbyte(index)
|
172
188
|
index += 1
|
173
|
-
break if newbyte.nil?
|
189
|
+
break if newbyte.nil?
|
190
|
+
unknown_bytes << newbyte
|
191
|
+
break if newbyte < 0x80
|
174
192
|
i += 1
|
175
193
|
break if i > 9
|
176
194
|
end
|
177
195
|
when 1
|
196
|
+
unknown_bytes << buff.byteslice(index, 8)
|
178
197
|
index += 8
|
179
198
|
when 2
|
180
|
-
## PULL_BYTES
|
181
199
|
value =
|
182
200
|
if (byte0 = buff.getbyte(index)) < 0x80
|
183
201
|
index += 1
|
@@ -233,15 +251,29 @@ module Api
|
|
233
251
|
raise "integer decoding error"
|
234
252
|
end
|
235
253
|
|
236
|
-
|
237
|
-
|
254
|
+
val = value
|
255
|
+
while val != 0
|
256
|
+
byte = val & 0x7F
|
238
257
|
|
239
|
-
|
258
|
+
val >>= 7
|
259
|
+
# This drops the top bits,
|
260
|
+
# Otherwise, with a signed right shift,
|
261
|
+
# we get infinity one bits at the top
|
262
|
+
val &= (1 << 57) - 1
|
263
|
+
|
264
|
+
byte |= 0x80 if val != 0
|
265
|
+
unknown_bytes << byte
|
266
|
+
end
|
267
|
+
|
268
|
+
unknown_bytes << buff.byteslice(index, value)
|
269
|
+
index += value
|
240
270
|
when 5
|
271
|
+
unknown_bytes << buff.byteslice(index, 4)
|
241
272
|
index += 4
|
242
273
|
else
|
243
274
|
raise "unknown wire type #{wire_type}"
|
244
275
|
end
|
276
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
245
277
|
return self if index >= len
|
246
278
|
## PULL_UINT64
|
247
279
|
tag =
|
@@ -1138,7 +1170,7 @@ module Api
|
|
1138
1170
|
|
1139
1171
|
buff
|
1140
1172
|
end
|
1141
|
-
|
1173
|
+
buff << @_unknown_fields if @_unknown_fields
|
1142
1174
|
buff
|
1143
1175
|
end
|
1144
1176
|
|
@@ -1319,20 +1351,38 @@ module Api
|
|
1319
1351
|
# unexpected, so discard it and continue.
|
1320
1352
|
if !found
|
1321
1353
|
wire_type = tag & 0x7
|
1354
|
+
|
1355
|
+
unknown_bytes = +"".b
|
1356
|
+
val = tag
|
1357
|
+
while val != 0
|
1358
|
+
byte = val & 0x7F
|
1359
|
+
|
1360
|
+
val >>= 7
|
1361
|
+
# This drops the top bits,
|
1362
|
+
# Otherwise, with a signed right shift,
|
1363
|
+
# we get infinity one bits at the top
|
1364
|
+
val &= (1 << 57) - 1
|
1365
|
+
|
1366
|
+
byte |= 0x80 if val != 0
|
1367
|
+
unknown_bytes << byte
|
1368
|
+
end
|
1369
|
+
|
1322
1370
|
case wire_type
|
1323
1371
|
when 0
|
1324
1372
|
i = 0
|
1325
1373
|
while true
|
1326
1374
|
newbyte = buff.getbyte(index)
|
1327
1375
|
index += 1
|
1328
|
-
break if newbyte.nil?
|
1376
|
+
break if newbyte.nil?
|
1377
|
+
unknown_bytes << newbyte
|
1378
|
+
break if newbyte < 0x80
|
1329
1379
|
i += 1
|
1330
1380
|
break if i > 9
|
1331
1381
|
end
|
1332
1382
|
when 1
|
1383
|
+
unknown_bytes << buff.byteslice(index, 8)
|
1333
1384
|
index += 8
|
1334
1385
|
when 2
|
1335
|
-
## PULL_BYTES
|
1336
1386
|
value =
|
1337
1387
|
if (byte0 = buff.getbyte(index)) < 0x80
|
1338
1388
|
index += 1
|
@@ -1388,15 +1438,29 @@ module Api
|
|
1388
1438
|
raise "integer decoding error"
|
1389
1439
|
end
|
1390
1440
|
|
1391
|
-
|
1392
|
-
|
1441
|
+
val = value
|
1442
|
+
while val != 0
|
1443
|
+
byte = val & 0x7F
|
1444
|
+
|
1445
|
+
val >>= 7
|
1446
|
+
# This drops the top bits,
|
1447
|
+
# Otherwise, with a signed right shift,
|
1448
|
+
# we get infinity one bits at the top
|
1449
|
+
val &= (1 << 57) - 1
|
1393
1450
|
|
1394
|
-
|
1451
|
+
byte |= 0x80 if val != 0
|
1452
|
+
unknown_bytes << byte
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
unknown_bytes << buff.byteslice(index, value)
|
1456
|
+
index += value
|
1395
1457
|
when 5
|
1458
|
+
unknown_bytes << buff.byteslice(index, 4)
|
1396
1459
|
index += 4
|
1397
1460
|
else
|
1398
1461
|
raise "unknown wire type #{wire_type}"
|
1399
1462
|
end
|
1463
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
1400
1464
|
return self if index >= len
|
1401
1465
|
## PULL_UINT64
|
1402
1466
|
tag =
|
@@ -1816,7 +1880,7 @@ module Api
|
|
1816
1880
|
buff << byte
|
1817
1881
|
end
|
1818
1882
|
end
|
1819
|
-
|
1883
|
+
buff << @_unknown_fields if @_unknown_fields
|
1820
1884
|
buff
|
1821
1885
|
end
|
1822
1886
|
|
@@ -2217,20 +2281,38 @@ module Api
|
|
2217
2281
|
# unexpected, so discard it and continue.
|
2218
2282
|
if !found
|
2219
2283
|
wire_type = tag & 0x7
|
2284
|
+
|
2285
|
+
unknown_bytes = +"".b
|
2286
|
+
val = tag
|
2287
|
+
while val != 0
|
2288
|
+
byte = val & 0x7F
|
2289
|
+
|
2290
|
+
val >>= 7
|
2291
|
+
# This drops the top bits,
|
2292
|
+
# Otherwise, with a signed right shift,
|
2293
|
+
# we get infinity one bits at the top
|
2294
|
+
val &= (1 << 57) - 1
|
2295
|
+
|
2296
|
+
byte |= 0x80 if val != 0
|
2297
|
+
unknown_bytes << byte
|
2298
|
+
end
|
2299
|
+
|
2220
2300
|
case wire_type
|
2221
2301
|
when 0
|
2222
2302
|
i = 0
|
2223
2303
|
while true
|
2224
2304
|
newbyte = buff.getbyte(index)
|
2225
2305
|
index += 1
|
2226
|
-
break if newbyte.nil?
|
2306
|
+
break if newbyte.nil?
|
2307
|
+
unknown_bytes << newbyte
|
2308
|
+
break if newbyte < 0x80
|
2227
2309
|
i += 1
|
2228
2310
|
break if i > 9
|
2229
2311
|
end
|
2230
2312
|
when 1
|
2313
|
+
unknown_bytes << buff.byteslice(index, 8)
|
2231
2314
|
index += 8
|
2232
2315
|
when 2
|
2233
|
-
## PULL_BYTES
|
2234
2316
|
value =
|
2235
2317
|
if (byte0 = buff.getbyte(index)) < 0x80
|
2236
2318
|
index += 1
|
@@ -2286,15 +2368,29 @@ module Api
|
|
2286
2368
|
raise "integer decoding error"
|
2287
2369
|
end
|
2288
2370
|
|
2289
|
-
|
2290
|
-
|
2371
|
+
val = value
|
2372
|
+
while val != 0
|
2373
|
+
byte = val & 0x7F
|
2291
2374
|
|
2292
|
-
|
2375
|
+
val >>= 7
|
2376
|
+
# This drops the top bits,
|
2377
|
+
# Otherwise, with a signed right shift,
|
2378
|
+
# we get infinity one bits at the top
|
2379
|
+
val &= (1 << 57) - 1
|
2380
|
+
|
2381
|
+
byte |= 0x80 if val != 0
|
2382
|
+
unknown_bytes << byte
|
2383
|
+
end
|
2384
|
+
|
2385
|
+
unknown_bytes << buff.byteslice(index, value)
|
2386
|
+
index += value
|
2293
2387
|
when 5
|
2388
|
+
unknown_bytes << buff.byteslice(index, 4)
|
2294
2389
|
index += 4
|
2295
2390
|
else
|
2296
2391
|
raise "unknown wire type #{wire_type}"
|
2297
2392
|
end
|
2393
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
2298
2394
|
return self if index >= len
|
2299
2395
|
## PULL_UINT64
|
2300
2396
|
tag =
|
@@ -3786,7 +3882,7 @@ module Api
|
|
3786
3882
|
buff << byte
|
3787
3883
|
end
|
3788
3884
|
end
|
3789
|
-
|
3885
|
+
buff << @_unknown_fields if @_unknown_fields
|
3790
3886
|
buff
|
3791
3887
|
end
|
3792
3888
|
|
@@ -4026,20 +4122,38 @@ module Api
|
|
4026
4122
|
# unexpected, so discard it and continue.
|
4027
4123
|
if !found
|
4028
4124
|
wire_type = tag & 0x7
|
4125
|
+
|
4126
|
+
unknown_bytes = +"".b
|
4127
|
+
val = tag
|
4128
|
+
while val != 0
|
4129
|
+
byte = val & 0x7F
|
4130
|
+
|
4131
|
+
val >>= 7
|
4132
|
+
# This drops the top bits,
|
4133
|
+
# Otherwise, with a signed right shift,
|
4134
|
+
# we get infinity one bits at the top
|
4135
|
+
val &= (1 << 57) - 1
|
4136
|
+
|
4137
|
+
byte |= 0x80 if val != 0
|
4138
|
+
unknown_bytes << byte
|
4139
|
+
end
|
4140
|
+
|
4029
4141
|
case wire_type
|
4030
4142
|
when 0
|
4031
4143
|
i = 0
|
4032
4144
|
while true
|
4033
4145
|
newbyte = buff.getbyte(index)
|
4034
4146
|
index += 1
|
4035
|
-
break if newbyte.nil?
|
4147
|
+
break if newbyte.nil?
|
4148
|
+
unknown_bytes << newbyte
|
4149
|
+
break if newbyte < 0x80
|
4036
4150
|
i += 1
|
4037
4151
|
break if i > 9
|
4038
4152
|
end
|
4039
4153
|
when 1
|
4154
|
+
unknown_bytes << buff.byteslice(index, 8)
|
4040
4155
|
index += 8
|
4041
4156
|
when 2
|
4042
|
-
## PULL_BYTES
|
4043
4157
|
value =
|
4044
4158
|
if (byte0 = buff.getbyte(index)) < 0x80
|
4045
4159
|
index += 1
|
@@ -4095,15 +4209,29 @@ module Api
|
|
4095
4209
|
raise "integer decoding error"
|
4096
4210
|
end
|
4097
4211
|
|
4098
|
-
|
4099
|
-
|
4212
|
+
val = value
|
4213
|
+
while val != 0
|
4214
|
+
byte = val & 0x7F
|
4215
|
+
|
4216
|
+
val >>= 7
|
4217
|
+
# This drops the top bits,
|
4218
|
+
# Otherwise, with a signed right shift,
|
4219
|
+
# we get infinity one bits at the top
|
4220
|
+
val &= (1 << 57) - 1
|
4221
|
+
|
4222
|
+
byte |= 0x80 if val != 0
|
4223
|
+
unknown_bytes << byte
|
4224
|
+
end
|
4100
4225
|
|
4101
|
-
|
4226
|
+
unknown_bytes << buff.byteslice(index, value)
|
4227
|
+
index += value
|
4102
4228
|
when 5
|
4229
|
+
unknown_bytes << buff.byteslice(index, 4)
|
4103
4230
|
index += 4
|
4104
4231
|
else
|
4105
4232
|
raise "unknown wire type #{wire_type}"
|
4106
4233
|
end
|
4234
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
4107
4235
|
return self if index >= len
|
4108
4236
|
## PULL_UINT64
|
4109
4237
|
tag =
|
@@ -4632,64 +4760,11 @@ module Api
|
|
4632
4760
|
|
4633
4761
|
## END PULL_UINT64
|
4634
4762
|
end
|
4635
|
-
if tag ==
|
4763
|
+
if tag == 0x28
|
4636
4764
|
found = true
|
4637
|
-
##
|
4638
|
-
value =
|
4639
|
-
if (byte0 = buff.getbyte(index)) < 0x80
|
4640
|
-
index += 1
|
4641
|
-
byte0
|
4642
|
-
elsif (byte1 = buff.getbyte(index + 1)) < 0x80
|
4643
|
-
index += 2
|
4644
|
-
(byte1 << 7) | (byte0 & 0x7F)
|
4645
|
-
elsif (byte2 = buff.getbyte(index + 2)) < 0x80
|
4646
|
-
index += 3
|
4647
|
-
(byte2 << 14) | ((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4648
|
-
elsif (byte3 = buff.getbyte(index + 3)) < 0x80
|
4649
|
-
index += 4
|
4650
|
-
(byte3 << 21) | ((byte2 & 0x7F) << 14) | ((byte1 & 0x7F) << 7) |
|
4651
|
-
(byte0 & 0x7F)
|
4652
|
-
elsif (byte4 = buff.getbyte(index + 4)) < 0x80
|
4653
|
-
index += 5
|
4654
|
-
(byte4 << 28) | ((byte3 & 0x7F) << 21) | ((byte2 & 0x7F) << 14) |
|
4655
|
-
((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4656
|
-
elsif (byte5 = buff.getbyte(index + 5)) < 0x80
|
4657
|
-
index += 6
|
4658
|
-
(byte5 << 35) | ((byte4 & 0x7F) << 28) | ((byte3 & 0x7F) << 21) |
|
4659
|
-
((byte2 & 0x7F) << 14) | ((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4660
|
-
elsif (byte6 = buff.getbyte(index + 6)) < 0x80
|
4661
|
-
index += 7
|
4662
|
-
(byte6 << 42) | ((byte5 & 0x7F) << 35) | ((byte4 & 0x7F) << 28) |
|
4663
|
-
((byte3 & 0x7F) << 21) | ((byte2 & 0x7F) << 14) |
|
4664
|
-
((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4665
|
-
elsif (byte7 = buff.getbyte(index + 7)) < 0x80
|
4666
|
-
index += 8
|
4667
|
-
(byte7 << 49) | ((byte6 & 0x7F) << 42) | ((byte5 & 0x7F) << 35) |
|
4668
|
-
((byte4 & 0x7F) << 28) | ((byte3 & 0x7F) << 21) |
|
4669
|
-
((byte2 & 0x7F) << 14) | ((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4670
|
-
elsif (byte8 = buff.getbyte(index + 8)) < 0x80
|
4671
|
-
index += 9
|
4672
|
-
(byte8 << 56) | ((byte7 & 0x7F) << 49) | ((byte6 & 0x7F) << 42) |
|
4673
|
-
((byte5 & 0x7F) << 35) | ((byte4 & 0x7F) << 28) |
|
4674
|
-
((byte3 & 0x7F) << 21) | ((byte2 & 0x7F) << 14) |
|
4675
|
-
((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4676
|
-
elsif (byte9 = buff.getbyte(index + 9)) < 0x80
|
4677
|
-
index += 10
|
4678
|
-
|
4679
|
-
(byte9 << 63) | ((byte8 & 0x7F) << 56) | ((byte7 & 0x7F) << 49) |
|
4680
|
-
((byte6 & 0x7F) << 42) | ((byte5 & 0x7F) << 35) |
|
4681
|
-
((byte4 & 0x7F) << 28) | ((byte3 & 0x7F) << 21) |
|
4682
|
-
((byte2 & 0x7F) << 14) | ((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4683
|
-
else
|
4684
|
-
raise "integer decoding error"
|
4685
|
-
end
|
4686
|
-
|
4687
|
-
## END PULL_UINT64
|
4688
|
-
|
4689
|
-
goal = index + value
|
4765
|
+
## DECODE REPEATED
|
4690
4766
|
list = @buffs
|
4691
4767
|
while true
|
4692
|
-
break if index >= goal
|
4693
4768
|
## PULL_INT32
|
4694
4769
|
list << if (byte0 = buff.getbyte(index)) < 0x80
|
4695
4770
|
index += 1
|
@@ -4752,60 +4827,71 @@ module Api
|
|
4752
4827
|
end
|
4753
4828
|
|
4754
4829
|
## END PULL_INT32
|
4755
|
-
end
|
4756
4830
|
|
4757
|
-
|
4758
|
-
|
4759
|
-
|
4760
|
-
|
4761
|
-
|
4762
|
-
|
4763
|
-
|
4764
|
-
|
4765
|
-
|
4766
|
-
|
4767
|
-
|
4768
|
-
|
4769
|
-
|
4770
|
-
|
4771
|
-
|
4772
|
-
|
4773
|
-
|
4774
|
-
|
4775
|
-
|
4776
|
-
|
4777
|
-
|
4778
|
-
index
|
4779
|
-
|
4780
|
-
(
|
4781
|
-
|
4782
|
-
|
4783
|
-
(byte6
|
4784
|
-
|
4785
|
-
(
|
4786
|
-
|
4787
|
-
|
4788
|
-
|
4789
|
-
|
4790
|
-
|
4791
|
-
|
4792
|
-
|
4793
|
-
|
4794
|
-
|
4795
|
-
|
4796
|
-
|
4797
|
-
|
4798
|
-
|
4831
|
+
return self if index >= len
|
4832
|
+
## PULL_UINT64
|
4833
|
+
tag =
|
4834
|
+
if (byte0 = buff.getbyte(index)) < 0x80
|
4835
|
+
index += 1
|
4836
|
+
byte0
|
4837
|
+
elsif (byte1 = buff.getbyte(index + 1)) < 0x80
|
4838
|
+
index += 2
|
4839
|
+
(byte1 << 7) | (byte0 & 0x7F)
|
4840
|
+
elsif (byte2 = buff.getbyte(index + 2)) < 0x80
|
4841
|
+
index += 3
|
4842
|
+
(byte2 << 14) | ((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4843
|
+
elsif (byte3 = buff.getbyte(index + 3)) < 0x80
|
4844
|
+
index += 4
|
4845
|
+
(byte3 << 21) | ((byte2 & 0x7F) << 14) | ((byte1 & 0x7F) << 7) |
|
4846
|
+
(byte0 & 0x7F)
|
4847
|
+
elsif (byte4 = buff.getbyte(index + 4)) < 0x80
|
4848
|
+
index += 5
|
4849
|
+
(byte4 << 28) | ((byte3 & 0x7F) << 21) |
|
4850
|
+
((byte2 & 0x7F) << 14) | ((byte1 & 0x7F) << 7) |
|
4851
|
+
(byte0 & 0x7F)
|
4852
|
+
elsif (byte5 = buff.getbyte(index + 5)) < 0x80
|
4853
|
+
index += 6
|
4854
|
+
(byte5 << 35) | ((byte4 & 0x7F) << 28) |
|
4855
|
+
((byte3 & 0x7F) << 21) | ((byte2 & 0x7F) << 14) |
|
4856
|
+
((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4857
|
+
elsif (byte6 = buff.getbyte(index + 6)) < 0x80
|
4858
|
+
index += 7
|
4859
|
+
(byte6 << 42) | ((byte5 & 0x7F) << 35) |
|
4860
|
+
((byte4 & 0x7F) << 28) | ((byte3 & 0x7F) << 21) |
|
4861
|
+
((byte2 & 0x7F) << 14) | ((byte1 & 0x7F) << 7) |
|
4862
|
+
(byte0 & 0x7F)
|
4863
|
+
elsif (byte7 = buff.getbyte(index + 7)) < 0x80
|
4864
|
+
index += 8
|
4865
|
+
(byte7 << 49) | ((byte6 & 0x7F) << 42) |
|
4866
|
+
((byte5 & 0x7F) << 35) | ((byte4 & 0x7F) << 28) |
|
4867
|
+
((byte3 & 0x7F) << 21) | ((byte2 & 0x7F) << 14) |
|
4868
|
+
((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4869
|
+
elsif (byte8 = buff.getbyte(index + 8)) < 0x80
|
4870
|
+
index += 9
|
4871
|
+
(byte8 << 56) | ((byte7 & 0x7F) << 49) |
|
4872
|
+
((byte6 & 0x7F) << 42) | ((byte5 & 0x7F) << 35) |
|
4873
|
+
((byte4 & 0x7F) << 28) | ((byte3 & 0x7F) << 21) |
|
4874
|
+
((byte2 & 0x7F) << 14) | ((byte1 & 0x7F) << 7) |
|
4875
|
+
(byte0 & 0x7F)
|
4876
|
+
elsif (byte9 = buff.getbyte(index + 9)) < 0x80
|
4877
|
+
index += 10
|
4799
4878
|
|
4800
|
-
|
4801
|
-
|
4802
|
-
|
4803
|
-
|
4804
|
-
|
4805
|
-
|
4806
|
-
|
4879
|
+
(byte9 << 63) | ((byte8 & 0x7F) << 56) |
|
4880
|
+
((byte7 & 0x7F) << 49) | ((byte6 & 0x7F) << 42) |
|
4881
|
+
((byte5 & 0x7F) << 35) | ((byte4 & 0x7F) << 28) |
|
4882
|
+
((byte3 & 0x7F) << 21) | ((byte2 & 0x7F) << 14) |
|
4883
|
+
((byte1 & 0x7F) << 7) | (byte0 & 0x7F)
|
4884
|
+
else
|
4885
|
+
raise "integer decoding error"
|
4886
|
+
end
|
4807
4887
|
|
4808
|
-
|
4888
|
+
## END PULL_UINT64
|
4889
|
+
|
4890
|
+
break unless tag == 0x28
|
4891
|
+
end
|
4892
|
+
## END DECODE REPEATED
|
4893
|
+
|
4894
|
+
return self if index >= len
|
4809
4895
|
end
|
4810
4896
|
|
4811
4897
|
return self if index >= len
|
@@ -4916,18 +5002,11 @@ module Api
|
|
4916
5002
|
|
4917
5003
|
list = @buffs
|
4918
5004
|
if list.size > 0
|
4919
|
-
buff << 0x2a
|
4920
|
-
|
4921
|
-
# Save the buffer size before appending the repeated bytes
|
4922
|
-
current_len = buff.bytesize
|
4923
|
-
|
4924
|
-
# Write a single dummy byte to later store encoded length
|
4925
|
-
buff << 42 # "*"
|
4926
|
-
|
4927
|
-
# write each item
|
4928
5005
|
list.each do |item|
|
4929
5006
|
val = item
|
4930
5007
|
if val != 0
|
5008
|
+
buff << 0x28
|
5009
|
+
|
4931
5010
|
while val != 0
|
4932
5011
|
byte = val & 0x7F
|
4933
5012
|
|
@@ -4942,42 +5021,8 @@ module Api
|
|
4942
5021
|
end
|
4943
5022
|
end
|
4944
5023
|
end
|
4945
|
-
|
4946
|
-
# Calculate the submessage's size
|
4947
|
-
submessage_size = buff.bytesize - current_len - 1
|
4948
|
-
|
4949
|
-
# Hope the size fits in one byte
|
4950
|
-
byte = submessage_size & 0x7F
|
4951
|
-
submessage_size >>= 7
|
4952
|
-
byte |= 0x80 if submessage_size > 0
|
4953
|
-
buff.setbyte(current_len, byte)
|
4954
|
-
|
4955
|
-
# If the sub message was bigger
|
4956
|
-
if submessage_size > 0
|
4957
|
-
current_len += 1
|
4958
|
-
|
4959
|
-
# compute how much we need to shift
|
4960
|
-
encoded_int_len = 0
|
4961
|
-
remaining_size = submessage_size
|
4962
|
-
while remaining_size != 0
|
4963
|
-
remaining_size >>= 7
|
4964
|
-
encoded_int_len += 1
|
4965
|
-
end
|
4966
|
-
|
4967
|
-
# Make space in the string with dummy bytes
|
4968
|
-
buff.bytesplice(current_len, 0, "*********", 0, encoded_int_len)
|
4969
|
-
|
4970
|
-
# Overwrite the dummy bytes with the encoded length
|
4971
|
-
while submessage_size != 0
|
4972
|
-
byte = submessage_size & 0x7F
|
4973
|
-
submessage_size >>= 7
|
4974
|
-
byte |= 0x80 if submessage_size > 0
|
4975
|
-
buff.setbyte(current_len, byte)
|
4976
|
-
current_len += 1
|
4977
|
-
end
|
4978
|
-
end
|
4979
5024
|
end
|
4980
|
-
|
5025
|
+
buff << @_unknown_fields if @_unknown_fields
|
4981
5026
|
buff
|
4982
5027
|
end
|
4983
5028
|
|
@@ -5077,20 +5122,38 @@ module Api
|
|
5077
5122
|
# unexpected, so discard it and continue.
|
5078
5123
|
if !found
|
5079
5124
|
wire_type = tag & 0x7
|
5125
|
+
|
5126
|
+
unknown_bytes = +"".b
|
5127
|
+
val = tag
|
5128
|
+
while val != 0
|
5129
|
+
byte = val & 0x7F
|
5130
|
+
|
5131
|
+
val >>= 7
|
5132
|
+
# This drops the top bits,
|
5133
|
+
# Otherwise, with a signed right shift,
|
5134
|
+
# we get infinity one bits at the top
|
5135
|
+
val &= (1 << 57) - 1
|
5136
|
+
|
5137
|
+
byte |= 0x80 if val != 0
|
5138
|
+
unknown_bytes << byte
|
5139
|
+
end
|
5140
|
+
|
5080
5141
|
case wire_type
|
5081
5142
|
when 0
|
5082
5143
|
i = 0
|
5083
5144
|
while true
|
5084
5145
|
newbyte = buff.getbyte(index)
|
5085
5146
|
index += 1
|
5086
|
-
break if newbyte.nil?
|
5147
|
+
break if newbyte.nil?
|
5148
|
+
unknown_bytes << newbyte
|
5149
|
+
break if newbyte < 0x80
|
5087
5150
|
i += 1
|
5088
5151
|
break if i > 9
|
5089
5152
|
end
|
5090
5153
|
when 1
|
5154
|
+
unknown_bytes << buff.byteslice(index, 8)
|
5091
5155
|
index += 8
|
5092
5156
|
when 2
|
5093
|
-
## PULL_BYTES
|
5094
5157
|
value =
|
5095
5158
|
if (byte0 = buff.getbyte(index)) < 0x80
|
5096
5159
|
index += 1
|
@@ -5146,15 +5209,29 @@ module Api
|
|
5146
5209
|
raise "integer decoding error"
|
5147
5210
|
end
|
5148
5211
|
|
5149
|
-
|
5150
|
-
|
5212
|
+
val = value
|
5213
|
+
while val != 0
|
5214
|
+
byte = val & 0x7F
|
5215
|
+
|
5216
|
+
val >>= 7
|
5217
|
+
# This drops the top bits,
|
5218
|
+
# Otherwise, with a signed right shift,
|
5219
|
+
# we get infinity one bits at the top
|
5220
|
+
val &= (1 << 57) - 1
|
5221
|
+
|
5222
|
+
byte |= 0x80 if val != 0
|
5223
|
+
unknown_bytes << byte
|
5224
|
+
end
|
5151
5225
|
|
5152
|
-
|
5226
|
+
unknown_bytes << buff.byteslice(index, value)
|
5227
|
+
index += value
|
5153
5228
|
when 5
|
5229
|
+
unknown_bytes << buff.byteslice(index, 4)
|
5154
5230
|
index += 4
|
5155
5231
|
else
|
5156
5232
|
raise "unknown wire type #{wire_type}"
|
5157
5233
|
end
|
5234
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
5158
5235
|
return self if index >= len
|
5159
5236
|
## PULL_UINT64
|
5160
5237
|
tag =
|
@@ -5403,7 +5480,7 @@ module Api
|
|
5403
5480
|
end
|
5404
5481
|
end
|
5405
5482
|
end
|
5406
|
-
|
5483
|
+
buff << @_unknown_fields if @_unknown_fields
|
5407
5484
|
buff
|
5408
5485
|
end
|
5409
5486
|
|
@@ -5556,20 +5633,38 @@ module Api
|
|
5556
5633
|
# unexpected, so discard it and continue.
|
5557
5634
|
if !found
|
5558
5635
|
wire_type = tag & 0x7
|
5636
|
+
|
5637
|
+
unknown_bytes = +"".b
|
5638
|
+
val = tag
|
5639
|
+
while val != 0
|
5640
|
+
byte = val & 0x7F
|
5641
|
+
|
5642
|
+
val >>= 7
|
5643
|
+
# This drops the top bits,
|
5644
|
+
# Otherwise, with a signed right shift,
|
5645
|
+
# we get infinity one bits at the top
|
5646
|
+
val &= (1 << 57) - 1
|
5647
|
+
|
5648
|
+
byte |= 0x80 if val != 0
|
5649
|
+
unknown_bytes << byte
|
5650
|
+
end
|
5651
|
+
|
5559
5652
|
case wire_type
|
5560
5653
|
when 0
|
5561
5654
|
i = 0
|
5562
5655
|
while true
|
5563
5656
|
newbyte = buff.getbyte(index)
|
5564
5657
|
index += 1
|
5565
|
-
break if newbyte.nil?
|
5658
|
+
break if newbyte.nil?
|
5659
|
+
unknown_bytes << newbyte
|
5660
|
+
break if newbyte < 0x80
|
5566
5661
|
i += 1
|
5567
5662
|
break if i > 9
|
5568
5663
|
end
|
5569
5664
|
when 1
|
5665
|
+
unknown_bytes << buff.byteslice(index, 8)
|
5570
5666
|
index += 8
|
5571
5667
|
when 2
|
5572
|
-
## PULL_BYTES
|
5573
5668
|
value =
|
5574
5669
|
if (byte0 = buff.getbyte(index)) < 0x80
|
5575
5670
|
index += 1
|
@@ -5625,15 +5720,29 @@ module Api
|
|
5625
5720
|
raise "integer decoding error"
|
5626
5721
|
end
|
5627
5722
|
|
5628
|
-
|
5629
|
-
|
5723
|
+
val = value
|
5724
|
+
while val != 0
|
5725
|
+
byte = val & 0x7F
|
5726
|
+
|
5727
|
+
val >>= 7
|
5728
|
+
# This drops the top bits,
|
5729
|
+
# Otherwise, with a signed right shift,
|
5730
|
+
# we get infinity one bits at the top
|
5731
|
+
val &= (1 << 57) - 1
|
5630
5732
|
|
5631
|
-
|
5733
|
+
byte |= 0x80 if val != 0
|
5734
|
+
unknown_bytes << byte
|
5735
|
+
end
|
5736
|
+
|
5737
|
+
unknown_bytes << buff.byteslice(index, value)
|
5738
|
+
index += value
|
5632
5739
|
when 5
|
5740
|
+
unknown_bytes << buff.byteslice(index, 4)
|
5633
5741
|
index += 4
|
5634
5742
|
else
|
5635
5743
|
raise "unknown wire type #{wire_type}"
|
5636
5744
|
end
|
5745
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
5637
5746
|
return self if index >= len
|
5638
5747
|
## PULL_UINT64
|
5639
5748
|
tag =
|
@@ -6181,7 +6290,7 @@ module Api
|
|
6181
6290
|
buff << byte
|
6182
6291
|
end
|
6183
6292
|
end
|
6184
|
-
|
6293
|
+
buff << @_unknown_fields if @_unknown_fields
|
6185
6294
|
buff
|
6186
6295
|
end
|
6187
6296
|
|
@@ -6326,20 +6435,38 @@ module Api
|
|
6326
6435
|
# unexpected, so discard it and continue.
|
6327
6436
|
if !found
|
6328
6437
|
wire_type = tag & 0x7
|
6438
|
+
|
6439
|
+
unknown_bytes = +"".b
|
6440
|
+
val = tag
|
6441
|
+
while val != 0
|
6442
|
+
byte = val & 0x7F
|
6443
|
+
|
6444
|
+
val >>= 7
|
6445
|
+
# This drops the top bits,
|
6446
|
+
# Otherwise, with a signed right shift,
|
6447
|
+
# we get infinity one bits at the top
|
6448
|
+
val &= (1 << 57) - 1
|
6449
|
+
|
6450
|
+
byte |= 0x80 if val != 0
|
6451
|
+
unknown_bytes << byte
|
6452
|
+
end
|
6453
|
+
|
6329
6454
|
case wire_type
|
6330
6455
|
when 0
|
6331
6456
|
i = 0
|
6332
6457
|
while true
|
6333
6458
|
newbyte = buff.getbyte(index)
|
6334
6459
|
index += 1
|
6335
|
-
break if newbyte.nil?
|
6460
|
+
break if newbyte.nil?
|
6461
|
+
unknown_bytes << newbyte
|
6462
|
+
break if newbyte < 0x80
|
6336
6463
|
i += 1
|
6337
6464
|
break if i > 9
|
6338
6465
|
end
|
6339
6466
|
when 1
|
6467
|
+
unknown_bytes << buff.byteslice(index, 8)
|
6340
6468
|
index += 8
|
6341
6469
|
when 2
|
6342
|
-
## PULL_BYTES
|
6343
6470
|
value =
|
6344
6471
|
if (byte0 = buff.getbyte(index)) < 0x80
|
6345
6472
|
index += 1
|
@@ -6395,15 +6522,29 @@ module Api
|
|
6395
6522
|
raise "integer decoding error"
|
6396
6523
|
end
|
6397
6524
|
|
6398
|
-
|
6399
|
-
|
6525
|
+
val = value
|
6526
|
+
while val != 0
|
6527
|
+
byte = val & 0x7F
|
6528
|
+
|
6529
|
+
val >>= 7
|
6530
|
+
# This drops the top bits,
|
6531
|
+
# Otherwise, with a signed right shift,
|
6532
|
+
# we get infinity one bits at the top
|
6533
|
+
val &= (1 << 57) - 1
|
6534
|
+
|
6535
|
+
byte |= 0x80 if val != 0
|
6536
|
+
unknown_bytes << byte
|
6537
|
+
end
|
6400
6538
|
|
6401
|
-
|
6539
|
+
unknown_bytes << buff.byteslice(index, value)
|
6540
|
+
index += value
|
6402
6541
|
when 5
|
6542
|
+
unknown_bytes << buff.byteslice(index, 4)
|
6403
6543
|
index += 4
|
6404
6544
|
else
|
6405
6545
|
raise "unknown wire type #{wire_type}"
|
6406
6546
|
end
|
6547
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
6407
6548
|
return self if index >= len
|
6408
6549
|
## PULL_UINT64
|
6409
6550
|
tag =
|
@@ -6648,7 +6789,7 @@ module Api
|
|
6648
6789
|
|
6649
6790
|
[val].pack("e", buffer: buff)
|
6650
6791
|
end
|
6651
|
-
|
6792
|
+
buff << @_unknown_fields if @_unknown_fields
|
6652
6793
|
buff
|
6653
6794
|
end
|
6654
6795
|
|
@@ -6782,20 +6923,38 @@ module Api
|
|
6782
6923
|
# unexpected, so discard it and continue.
|
6783
6924
|
if !found
|
6784
6925
|
wire_type = tag & 0x7
|
6926
|
+
|
6927
|
+
unknown_bytes = +"".b
|
6928
|
+
val = tag
|
6929
|
+
while val != 0
|
6930
|
+
byte = val & 0x7F
|
6931
|
+
|
6932
|
+
val >>= 7
|
6933
|
+
# This drops the top bits,
|
6934
|
+
# Otherwise, with a signed right shift,
|
6935
|
+
# we get infinity one bits at the top
|
6936
|
+
val &= (1 << 57) - 1
|
6937
|
+
|
6938
|
+
byte |= 0x80 if val != 0
|
6939
|
+
unknown_bytes << byte
|
6940
|
+
end
|
6941
|
+
|
6785
6942
|
case wire_type
|
6786
6943
|
when 0
|
6787
6944
|
i = 0
|
6788
6945
|
while true
|
6789
6946
|
newbyte = buff.getbyte(index)
|
6790
6947
|
index += 1
|
6791
|
-
break if newbyte.nil?
|
6948
|
+
break if newbyte.nil?
|
6949
|
+
unknown_bytes << newbyte
|
6950
|
+
break if newbyte < 0x80
|
6792
6951
|
i += 1
|
6793
6952
|
break if i > 9
|
6794
6953
|
end
|
6795
6954
|
when 1
|
6955
|
+
unknown_bytes << buff.byteslice(index, 8)
|
6796
6956
|
index += 8
|
6797
6957
|
when 2
|
6798
|
-
## PULL_BYTES
|
6799
6958
|
value =
|
6800
6959
|
if (byte0 = buff.getbyte(index)) < 0x80
|
6801
6960
|
index += 1
|
@@ -6851,15 +7010,29 @@ module Api
|
|
6851
7010
|
raise "integer decoding error"
|
6852
7011
|
end
|
6853
7012
|
|
6854
|
-
|
6855
|
-
|
7013
|
+
val = value
|
7014
|
+
while val != 0
|
7015
|
+
byte = val & 0x7F
|
7016
|
+
|
7017
|
+
val >>= 7
|
7018
|
+
# This drops the top bits,
|
7019
|
+
# Otherwise, with a signed right shift,
|
7020
|
+
# we get infinity one bits at the top
|
7021
|
+
val &= (1 << 57) - 1
|
7022
|
+
|
7023
|
+
byte |= 0x80 if val != 0
|
7024
|
+
unknown_bytes << byte
|
7025
|
+
end
|
6856
7026
|
|
6857
|
-
|
7027
|
+
unknown_bytes << buff.byteslice(index, value)
|
7028
|
+
index += value
|
6858
7029
|
when 5
|
7030
|
+
unknown_bytes << buff.byteslice(index, 4)
|
6859
7031
|
index += 4
|
6860
7032
|
else
|
6861
7033
|
raise "unknown wire type #{wire_type}"
|
6862
7034
|
end
|
7035
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
6863
7036
|
return self if index >= len
|
6864
7037
|
## PULL_UINT64
|
6865
7038
|
tag =
|
@@ -7458,7 +7631,7 @@ module Api
|
|
7458
7631
|
end
|
7459
7632
|
end
|
7460
7633
|
end
|
7461
|
-
|
7634
|
+
buff << @_unknown_fields if @_unknown_fields
|
7462
7635
|
buff
|
7463
7636
|
end
|
7464
7637
|
|
@@ -7700,20 +7873,38 @@ module Api
|
|
7700
7873
|
# unexpected, so discard it and continue.
|
7701
7874
|
if !found
|
7702
7875
|
wire_type = tag & 0x7
|
7876
|
+
|
7877
|
+
unknown_bytes = +"".b
|
7878
|
+
val = tag
|
7879
|
+
while val != 0
|
7880
|
+
byte = val & 0x7F
|
7881
|
+
|
7882
|
+
val >>= 7
|
7883
|
+
# This drops the top bits,
|
7884
|
+
# Otherwise, with a signed right shift,
|
7885
|
+
# we get infinity one bits at the top
|
7886
|
+
val &= (1 << 57) - 1
|
7887
|
+
|
7888
|
+
byte |= 0x80 if val != 0
|
7889
|
+
unknown_bytes << byte
|
7890
|
+
end
|
7891
|
+
|
7703
7892
|
case wire_type
|
7704
7893
|
when 0
|
7705
7894
|
i = 0
|
7706
7895
|
while true
|
7707
7896
|
newbyte = buff.getbyte(index)
|
7708
7897
|
index += 1
|
7709
|
-
break if newbyte.nil?
|
7898
|
+
break if newbyte.nil?
|
7899
|
+
unknown_bytes << newbyte
|
7900
|
+
break if newbyte < 0x80
|
7710
7901
|
i += 1
|
7711
7902
|
break if i > 9
|
7712
7903
|
end
|
7713
7904
|
when 1
|
7905
|
+
unknown_bytes << buff.byteslice(index, 8)
|
7714
7906
|
index += 8
|
7715
7907
|
when 2
|
7716
|
-
## PULL_BYTES
|
7717
7908
|
value =
|
7718
7909
|
if (byte0 = buff.getbyte(index)) < 0x80
|
7719
7910
|
index += 1
|
@@ -7769,15 +7960,29 @@ module Api
|
|
7769
7960
|
raise "integer decoding error"
|
7770
7961
|
end
|
7771
7962
|
|
7772
|
-
|
7773
|
-
|
7963
|
+
val = value
|
7964
|
+
while val != 0
|
7965
|
+
byte = val & 0x7F
|
7966
|
+
|
7967
|
+
val >>= 7
|
7968
|
+
# This drops the top bits,
|
7969
|
+
# Otherwise, with a signed right shift,
|
7970
|
+
# we get infinity one bits at the top
|
7971
|
+
val &= (1 << 57) - 1
|
7972
|
+
|
7973
|
+
byte |= 0x80 if val != 0
|
7974
|
+
unknown_bytes << byte
|
7975
|
+
end
|
7774
7976
|
|
7775
|
-
|
7977
|
+
unknown_bytes << buff.byteslice(index, value)
|
7978
|
+
index += value
|
7776
7979
|
when 5
|
7980
|
+
unknown_bytes << buff.byteslice(index, 4)
|
7777
7981
|
index += 4
|
7778
7982
|
else
|
7779
7983
|
raise "unknown wire type #{wire_type}"
|
7780
7984
|
end
|
7985
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
7781
7986
|
return self if index >= len
|
7782
7987
|
## PULL_UINT64
|
7783
7988
|
tag =
|
@@ -9322,7 +9527,7 @@ module Api
|
|
9322
9527
|
|
9323
9528
|
buff
|
9324
9529
|
end
|
9325
|
-
|
9530
|
+
buff << @_unknown_fields if @_unknown_fields
|
9326
9531
|
buff
|
9327
9532
|
end
|
9328
9533
|
|
@@ -9504,20 +9709,38 @@ module Api
|
|
9504
9709
|
# unexpected, so discard it and continue.
|
9505
9710
|
if !found
|
9506
9711
|
wire_type = tag & 0x7
|
9712
|
+
|
9713
|
+
unknown_bytes = +"".b
|
9714
|
+
val = tag
|
9715
|
+
while val != 0
|
9716
|
+
byte = val & 0x7F
|
9717
|
+
|
9718
|
+
val >>= 7
|
9719
|
+
# This drops the top bits,
|
9720
|
+
# Otherwise, with a signed right shift,
|
9721
|
+
# we get infinity one bits at the top
|
9722
|
+
val &= (1 << 57) - 1
|
9723
|
+
|
9724
|
+
byte |= 0x80 if val != 0
|
9725
|
+
unknown_bytes << byte
|
9726
|
+
end
|
9727
|
+
|
9507
9728
|
case wire_type
|
9508
9729
|
when 0
|
9509
9730
|
i = 0
|
9510
9731
|
while true
|
9511
9732
|
newbyte = buff.getbyte(index)
|
9512
9733
|
index += 1
|
9513
|
-
break if newbyte.nil?
|
9734
|
+
break if newbyte.nil?
|
9735
|
+
unknown_bytes << newbyte
|
9736
|
+
break if newbyte < 0x80
|
9514
9737
|
i += 1
|
9515
9738
|
break if i > 9
|
9516
9739
|
end
|
9517
9740
|
when 1
|
9741
|
+
unknown_bytes << buff.byteslice(index, 8)
|
9518
9742
|
index += 8
|
9519
9743
|
when 2
|
9520
|
-
## PULL_BYTES
|
9521
9744
|
value =
|
9522
9745
|
if (byte0 = buff.getbyte(index)) < 0x80
|
9523
9746
|
index += 1
|
@@ -9573,15 +9796,29 @@ module Api
|
|
9573
9796
|
raise "integer decoding error"
|
9574
9797
|
end
|
9575
9798
|
|
9576
|
-
|
9577
|
-
|
9799
|
+
val = value
|
9800
|
+
while val != 0
|
9801
|
+
byte = val & 0x7F
|
9802
|
+
|
9803
|
+
val >>= 7
|
9804
|
+
# This drops the top bits,
|
9805
|
+
# Otherwise, with a signed right shift,
|
9806
|
+
# we get infinity one bits at the top
|
9807
|
+
val &= (1 << 57) - 1
|
9578
9808
|
|
9579
|
-
|
9809
|
+
byte |= 0x80 if val != 0
|
9810
|
+
unknown_bytes << byte
|
9811
|
+
end
|
9812
|
+
|
9813
|
+
unknown_bytes << buff.byteslice(index, value)
|
9814
|
+
index += value
|
9580
9815
|
when 5
|
9816
|
+
unknown_bytes << buff.byteslice(index, 4)
|
9581
9817
|
index += 4
|
9582
9818
|
else
|
9583
9819
|
raise "unknown wire type #{wire_type}"
|
9584
9820
|
end
|
9821
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
9585
9822
|
return self if index >= len
|
9586
9823
|
## PULL_UINT64
|
9587
9824
|
tag =
|
@@ -9899,7 +10136,7 @@ module Api
|
|
9899
10136
|
buff << byte
|
9900
10137
|
end
|
9901
10138
|
end
|
9902
|
-
|
10139
|
+
buff << @_unknown_fields if @_unknown_fields
|
9903
10140
|
buff
|
9904
10141
|
end
|
9905
10142
|
|
@@ -10015,20 +10252,38 @@ module Api
|
|
10015
10252
|
# unexpected, so discard it and continue.
|
10016
10253
|
if !found
|
10017
10254
|
wire_type = tag & 0x7
|
10255
|
+
|
10256
|
+
unknown_bytes = +"".b
|
10257
|
+
val = tag
|
10258
|
+
while val != 0
|
10259
|
+
byte = val & 0x7F
|
10260
|
+
|
10261
|
+
val >>= 7
|
10262
|
+
# This drops the top bits,
|
10263
|
+
# Otherwise, with a signed right shift,
|
10264
|
+
# we get infinity one bits at the top
|
10265
|
+
val &= (1 << 57) - 1
|
10266
|
+
|
10267
|
+
byte |= 0x80 if val != 0
|
10268
|
+
unknown_bytes << byte
|
10269
|
+
end
|
10270
|
+
|
10018
10271
|
case wire_type
|
10019
10272
|
when 0
|
10020
10273
|
i = 0
|
10021
10274
|
while true
|
10022
10275
|
newbyte = buff.getbyte(index)
|
10023
10276
|
index += 1
|
10024
|
-
break if newbyte.nil?
|
10277
|
+
break if newbyte.nil?
|
10278
|
+
unknown_bytes << newbyte
|
10279
|
+
break if newbyte < 0x80
|
10025
10280
|
i += 1
|
10026
10281
|
break if i > 9
|
10027
10282
|
end
|
10028
10283
|
when 1
|
10284
|
+
unknown_bytes << buff.byteslice(index, 8)
|
10029
10285
|
index += 8
|
10030
10286
|
when 2
|
10031
|
-
## PULL_BYTES
|
10032
10287
|
value =
|
10033
10288
|
if (byte0 = buff.getbyte(index)) < 0x80
|
10034
10289
|
index += 1
|
@@ -10084,15 +10339,29 @@ module Api
|
|
10084
10339
|
raise "integer decoding error"
|
10085
10340
|
end
|
10086
10341
|
|
10087
|
-
|
10088
|
-
|
10342
|
+
val = value
|
10343
|
+
while val != 0
|
10344
|
+
byte = val & 0x7F
|
10345
|
+
|
10346
|
+
val >>= 7
|
10347
|
+
# This drops the top bits,
|
10348
|
+
# Otherwise, with a signed right shift,
|
10349
|
+
# we get infinity one bits at the top
|
10350
|
+
val &= (1 << 57) - 1
|
10351
|
+
|
10352
|
+
byte |= 0x80 if val != 0
|
10353
|
+
unknown_bytes << byte
|
10354
|
+
end
|
10089
10355
|
|
10090
|
-
|
10356
|
+
unknown_bytes << buff.byteslice(index, value)
|
10357
|
+
index += value
|
10091
10358
|
when 5
|
10359
|
+
unknown_bytes << buff.byteslice(index, 4)
|
10092
10360
|
index += 4
|
10093
10361
|
else
|
10094
10362
|
raise "unknown wire type #{wire_type}"
|
10095
10363
|
end
|
10364
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
10096
10365
|
return self if index >= len
|
10097
10366
|
## PULL_UINT64
|
10098
10367
|
tag =
|
@@ -10224,7 +10493,7 @@ module Api
|
|
10224
10493
|
else
|
10225
10494
|
raise "bool values should be true or false"
|
10226
10495
|
end
|
10227
|
-
|
10496
|
+
buff << @_unknown_fields if @_unknown_fields
|
10228
10497
|
buff
|
10229
10498
|
end
|
10230
10499
|
|
@@ -10339,20 +10608,38 @@ module Api
|
|
10339
10608
|
# unexpected, so discard it and continue.
|
10340
10609
|
if !found
|
10341
10610
|
wire_type = tag & 0x7
|
10611
|
+
|
10612
|
+
unknown_bytes = +"".b
|
10613
|
+
val = tag
|
10614
|
+
while val != 0
|
10615
|
+
byte = val & 0x7F
|
10616
|
+
|
10617
|
+
val >>= 7
|
10618
|
+
# This drops the top bits,
|
10619
|
+
# Otherwise, with a signed right shift,
|
10620
|
+
# we get infinity one bits at the top
|
10621
|
+
val &= (1 << 57) - 1
|
10622
|
+
|
10623
|
+
byte |= 0x80 if val != 0
|
10624
|
+
unknown_bytes << byte
|
10625
|
+
end
|
10626
|
+
|
10342
10627
|
case wire_type
|
10343
10628
|
when 0
|
10344
10629
|
i = 0
|
10345
10630
|
while true
|
10346
10631
|
newbyte = buff.getbyte(index)
|
10347
10632
|
index += 1
|
10348
|
-
break if newbyte.nil?
|
10633
|
+
break if newbyte.nil?
|
10634
|
+
unknown_bytes << newbyte
|
10635
|
+
break if newbyte < 0x80
|
10349
10636
|
i += 1
|
10350
10637
|
break if i > 9
|
10351
10638
|
end
|
10352
10639
|
when 1
|
10640
|
+
unknown_bytes << buff.byteslice(index, 8)
|
10353
10641
|
index += 8
|
10354
10642
|
when 2
|
10355
|
-
## PULL_BYTES
|
10356
10643
|
value =
|
10357
10644
|
if (byte0 = buff.getbyte(index)) < 0x80
|
10358
10645
|
index += 1
|
@@ -10408,15 +10695,29 @@ module Api
|
|
10408
10695
|
raise "integer decoding error"
|
10409
10696
|
end
|
10410
10697
|
|
10411
|
-
|
10412
|
-
|
10698
|
+
val = value
|
10699
|
+
while val != 0
|
10700
|
+
byte = val & 0x7F
|
10701
|
+
|
10702
|
+
val >>= 7
|
10703
|
+
# This drops the top bits,
|
10704
|
+
# Otherwise, with a signed right shift,
|
10705
|
+
# we get infinity one bits at the top
|
10706
|
+
val &= (1 << 57) - 1
|
10707
|
+
|
10708
|
+
byte |= 0x80 if val != 0
|
10709
|
+
unknown_bytes << byte
|
10710
|
+
end
|
10413
10711
|
|
10414
|
-
|
10712
|
+
unknown_bytes << buff.byteslice(index, value)
|
10713
|
+
index += value
|
10415
10714
|
when 5
|
10715
|
+
unknown_bytes << buff.byteslice(index, 4)
|
10416
10716
|
index += 4
|
10417
10717
|
else
|
10418
10718
|
raise "unknown wire type #{wire_type}"
|
10419
10719
|
end
|
10720
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
10420
10721
|
return self if index >= len
|
10421
10722
|
## PULL_UINT64
|
10422
10723
|
tag =
|
@@ -10548,7 +10849,7 @@ module Api
|
|
10548
10849
|
else
|
10549
10850
|
raise "bool values should be true or false"
|
10550
10851
|
end
|
10551
|
-
|
10852
|
+
buff << @_unknown_fields if @_unknown_fields
|
10552
10853
|
buff
|
10553
10854
|
end
|
10554
10855
|
|
@@ -10584,20 +10885,38 @@ module Api
|
|
10584
10885
|
# unexpected, so discard it and continue.
|
10585
10886
|
if !found
|
10586
10887
|
wire_type = tag & 0x7
|
10888
|
+
|
10889
|
+
unknown_bytes = +"".b
|
10890
|
+
val = tag
|
10891
|
+
while val != 0
|
10892
|
+
byte = val & 0x7F
|
10893
|
+
|
10894
|
+
val >>= 7
|
10895
|
+
# This drops the top bits,
|
10896
|
+
# Otherwise, with a signed right shift,
|
10897
|
+
# we get infinity one bits at the top
|
10898
|
+
val &= (1 << 57) - 1
|
10899
|
+
|
10900
|
+
byte |= 0x80 if val != 0
|
10901
|
+
unknown_bytes << byte
|
10902
|
+
end
|
10903
|
+
|
10587
10904
|
case wire_type
|
10588
10905
|
when 0
|
10589
10906
|
i = 0
|
10590
10907
|
while true
|
10591
10908
|
newbyte = buff.getbyte(index)
|
10592
10909
|
index += 1
|
10593
|
-
break if newbyte.nil?
|
10910
|
+
break if newbyte.nil?
|
10911
|
+
unknown_bytes << newbyte
|
10912
|
+
break if newbyte < 0x80
|
10594
10913
|
i += 1
|
10595
10914
|
break if i > 9
|
10596
10915
|
end
|
10597
10916
|
when 1
|
10917
|
+
unknown_bytes << buff.byteslice(index, 8)
|
10598
10918
|
index += 8
|
10599
10919
|
when 2
|
10600
|
-
## PULL_BYTES
|
10601
10920
|
value =
|
10602
10921
|
if (byte0 = buff.getbyte(index)) < 0x80
|
10603
10922
|
index += 1
|
@@ -10653,15 +10972,29 @@ module Api
|
|
10653
10972
|
raise "integer decoding error"
|
10654
10973
|
end
|
10655
10974
|
|
10656
|
-
|
10657
|
-
|
10975
|
+
val = value
|
10976
|
+
while val != 0
|
10977
|
+
byte = val & 0x7F
|
10978
|
+
|
10979
|
+
val >>= 7
|
10980
|
+
# This drops the top bits,
|
10981
|
+
# Otherwise, with a signed right shift,
|
10982
|
+
# we get infinity one bits at the top
|
10983
|
+
val &= (1 << 57) - 1
|
10984
|
+
|
10985
|
+
byte |= 0x80 if val != 0
|
10986
|
+
unknown_bytes << byte
|
10987
|
+
end
|
10658
10988
|
|
10659
|
-
|
10989
|
+
unknown_bytes << buff.byteslice(index, value)
|
10990
|
+
index += value
|
10660
10991
|
when 5
|
10992
|
+
unknown_bytes << buff.byteslice(index, 4)
|
10661
10993
|
index += 4
|
10662
10994
|
else
|
10663
10995
|
raise "unknown wire type #{wire_type}"
|
10664
10996
|
end
|
10997
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
10665
10998
|
return self if index >= len
|
10666
10999
|
## PULL_UINT64
|
10667
11000
|
tag =
|
@@ -10721,6 +11054,7 @@ module Api
|
|
10721
11054
|
end
|
10722
11055
|
end
|
10723
11056
|
def _encode(buff)
|
11057
|
+
buff << @_unknown_fields if @_unknown_fields
|
10724
11058
|
buff
|
10725
11059
|
end
|
10726
11060
|
|
@@ -10859,20 +11193,38 @@ module Api
|
|
10859
11193
|
# unexpected, so discard it and continue.
|
10860
11194
|
if !found
|
10861
11195
|
wire_type = tag & 0x7
|
11196
|
+
|
11197
|
+
unknown_bytes = +"".b
|
11198
|
+
val = tag
|
11199
|
+
while val != 0
|
11200
|
+
byte = val & 0x7F
|
11201
|
+
|
11202
|
+
val >>= 7
|
11203
|
+
# This drops the top bits,
|
11204
|
+
# Otherwise, with a signed right shift,
|
11205
|
+
# we get infinity one bits at the top
|
11206
|
+
val &= (1 << 57) - 1
|
11207
|
+
|
11208
|
+
byte |= 0x80 if val != 0
|
11209
|
+
unknown_bytes << byte
|
11210
|
+
end
|
11211
|
+
|
10862
11212
|
case wire_type
|
10863
11213
|
when 0
|
10864
11214
|
i = 0
|
10865
11215
|
while true
|
10866
11216
|
newbyte = buff.getbyte(index)
|
10867
11217
|
index += 1
|
10868
|
-
break if newbyte.nil?
|
11218
|
+
break if newbyte.nil?
|
11219
|
+
unknown_bytes << newbyte
|
11220
|
+
break if newbyte < 0x80
|
10869
11221
|
i += 1
|
10870
11222
|
break if i > 9
|
10871
11223
|
end
|
10872
11224
|
when 1
|
11225
|
+
unknown_bytes << buff.byteslice(index, 8)
|
10873
11226
|
index += 8
|
10874
11227
|
when 2
|
10875
|
-
## PULL_BYTES
|
10876
11228
|
value =
|
10877
11229
|
if (byte0 = buff.getbyte(index)) < 0x80
|
10878
11230
|
index += 1
|
@@ -10928,15 +11280,29 @@ module Api
|
|
10928
11280
|
raise "integer decoding error"
|
10929
11281
|
end
|
10930
11282
|
|
10931
|
-
|
10932
|
-
|
11283
|
+
val = value
|
11284
|
+
while val != 0
|
11285
|
+
byte = val & 0x7F
|
11286
|
+
|
11287
|
+
val >>= 7
|
11288
|
+
# This drops the top bits,
|
11289
|
+
# Otherwise, with a signed right shift,
|
11290
|
+
# we get infinity one bits at the top
|
11291
|
+
val &= (1 << 57) - 1
|
11292
|
+
|
11293
|
+
byte |= 0x80 if val != 0
|
11294
|
+
unknown_bytes << byte
|
11295
|
+
end
|
10933
11296
|
|
10934
|
-
|
11297
|
+
unknown_bytes << buff.byteslice(index, value)
|
11298
|
+
index += value
|
10935
11299
|
when 5
|
11300
|
+
unknown_bytes << buff.byteslice(index, 4)
|
10936
11301
|
index += 4
|
10937
11302
|
else
|
10938
11303
|
raise "unknown wire type #{wire_type}"
|
10939
11304
|
end
|
11305
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
10940
11306
|
return self if index >= len
|
10941
11307
|
## PULL_UINT64
|
10942
11308
|
tag =
|
@@ -11134,7 +11500,7 @@ module Api
|
|
11134
11500
|
buff << byte
|
11135
11501
|
end
|
11136
11502
|
end
|
11137
|
-
|
11503
|
+
buff << @_unknown_fields if @_unknown_fields
|
11138
11504
|
buff
|
11139
11505
|
end
|
11140
11506
|
|
@@ -11310,20 +11676,38 @@ module Api
|
|
11310
11676
|
# unexpected, so discard it and continue.
|
11311
11677
|
if !found
|
11312
11678
|
wire_type = tag & 0x7
|
11679
|
+
|
11680
|
+
unknown_bytes = +"".b
|
11681
|
+
val = tag
|
11682
|
+
while val != 0
|
11683
|
+
byte = val & 0x7F
|
11684
|
+
|
11685
|
+
val >>= 7
|
11686
|
+
# This drops the top bits,
|
11687
|
+
# Otherwise, with a signed right shift,
|
11688
|
+
# we get infinity one bits at the top
|
11689
|
+
val &= (1 << 57) - 1
|
11690
|
+
|
11691
|
+
byte |= 0x80 if val != 0
|
11692
|
+
unknown_bytes << byte
|
11693
|
+
end
|
11694
|
+
|
11313
11695
|
case wire_type
|
11314
11696
|
when 0
|
11315
11697
|
i = 0
|
11316
11698
|
while true
|
11317
11699
|
newbyte = buff.getbyte(index)
|
11318
11700
|
index += 1
|
11319
|
-
break if newbyte.nil?
|
11701
|
+
break if newbyte.nil?
|
11702
|
+
unknown_bytes << newbyte
|
11703
|
+
break if newbyte < 0x80
|
11320
11704
|
i += 1
|
11321
11705
|
break if i > 9
|
11322
11706
|
end
|
11323
11707
|
when 1
|
11708
|
+
unknown_bytes << buff.byteslice(index, 8)
|
11324
11709
|
index += 8
|
11325
11710
|
when 2
|
11326
|
-
## PULL_BYTES
|
11327
11711
|
value =
|
11328
11712
|
if (byte0 = buff.getbyte(index)) < 0x80
|
11329
11713
|
index += 1
|
@@ -11379,15 +11763,29 @@ module Api
|
|
11379
11763
|
raise "integer decoding error"
|
11380
11764
|
end
|
11381
11765
|
|
11382
|
-
|
11383
|
-
|
11766
|
+
val = value
|
11767
|
+
while val != 0
|
11768
|
+
byte = val & 0x7F
|
11769
|
+
|
11770
|
+
val >>= 7
|
11771
|
+
# This drops the top bits,
|
11772
|
+
# Otherwise, with a signed right shift,
|
11773
|
+
# we get infinity one bits at the top
|
11774
|
+
val &= (1 << 57) - 1
|
11775
|
+
|
11776
|
+
byte |= 0x80 if val != 0
|
11777
|
+
unknown_bytes << byte
|
11778
|
+
end
|
11384
11779
|
|
11385
|
-
|
11780
|
+
unknown_bytes << buff.byteslice(index, value)
|
11781
|
+
index += value
|
11386
11782
|
when 5
|
11783
|
+
unknown_bytes << buff.byteslice(index, 4)
|
11387
11784
|
index += 4
|
11388
11785
|
else
|
11389
11786
|
raise "unknown wire type #{wire_type}"
|
11390
11787
|
end
|
11788
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
11391
11789
|
return self if index >= len
|
11392
11790
|
## PULL_UINT64
|
11393
11791
|
tag =
|
@@ -11723,7 +12121,7 @@ module Api
|
|
11723
12121
|
buff << byte
|
11724
12122
|
end
|
11725
12123
|
end
|
11726
|
-
|
12124
|
+
buff << @_unknown_fields if @_unknown_fields
|
11727
12125
|
buff
|
11728
12126
|
end
|
11729
12127
|
|
@@ -11848,20 +12246,38 @@ module Api
|
|
11848
12246
|
# unexpected, so discard it and continue.
|
11849
12247
|
if !found
|
11850
12248
|
wire_type = tag & 0x7
|
12249
|
+
|
12250
|
+
unknown_bytes = +"".b
|
12251
|
+
val = tag
|
12252
|
+
while val != 0
|
12253
|
+
byte = val & 0x7F
|
12254
|
+
|
12255
|
+
val >>= 7
|
12256
|
+
# This drops the top bits,
|
12257
|
+
# Otherwise, with a signed right shift,
|
12258
|
+
# we get infinity one bits at the top
|
12259
|
+
val &= (1 << 57) - 1
|
12260
|
+
|
12261
|
+
byte |= 0x80 if val != 0
|
12262
|
+
unknown_bytes << byte
|
12263
|
+
end
|
12264
|
+
|
11851
12265
|
case wire_type
|
11852
12266
|
when 0
|
11853
12267
|
i = 0
|
11854
12268
|
while true
|
11855
12269
|
newbyte = buff.getbyte(index)
|
11856
12270
|
index += 1
|
11857
|
-
break if newbyte.nil?
|
12271
|
+
break if newbyte.nil?
|
12272
|
+
unknown_bytes << newbyte
|
12273
|
+
break if newbyte < 0x80
|
11858
12274
|
i += 1
|
11859
12275
|
break if i > 9
|
11860
12276
|
end
|
11861
12277
|
when 1
|
12278
|
+
unknown_bytes << buff.byteslice(index, 8)
|
11862
12279
|
index += 8
|
11863
12280
|
when 2
|
11864
|
-
## PULL_BYTES
|
11865
12281
|
value =
|
11866
12282
|
if (byte0 = buff.getbyte(index)) < 0x80
|
11867
12283
|
index += 1
|
@@ -11917,15 +12333,29 @@ module Api
|
|
11917
12333
|
raise "integer decoding error"
|
11918
12334
|
end
|
11919
12335
|
|
11920
|
-
|
11921
|
-
|
12336
|
+
val = value
|
12337
|
+
while val != 0
|
12338
|
+
byte = val & 0x7F
|
12339
|
+
|
12340
|
+
val >>= 7
|
12341
|
+
# This drops the top bits,
|
12342
|
+
# Otherwise, with a signed right shift,
|
12343
|
+
# we get infinity one bits at the top
|
12344
|
+
val &= (1 << 57) - 1
|
12345
|
+
|
12346
|
+
byte |= 0x80 if val != 0
|
12347
|
+
unknown_bytes << byte
|
12348
|
+
end
|
11922
12349
|
|
11923
|
-
|
12350
|
+
unknown_bytes << buff.byteslice(index, value)
|
12351
|
+
index += value
|
11924
12352
|
when 5
|
12353
|
+
unknown_bytes << buff.byteslice(index, 4)
|
11925
12354
|
index += 4
|
11926
12355
|
else
|
11927
12356
|
raise "unknown wire type #{wire_type}"
|
11928
12357
|
end
|
12358
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
11929
12359
|
return self if index >= len
|
11930
12360
|
## PULL_UINT64
|
11931
12361
|
tag =
|
@@ -12123,7 +12553,7 @@ module Api
|
|
12123
12553
|
buff << byte
|
12124
12554
|
end
|
12125
12555
|
end
|
12126
|
-
|
12556
|
+
buff << @_unknown_fields if @_unknown_fields
|
12127
12557
|
buff
|
12128
12558
|
end
|
12129
12559
|
|
@@ -12247,20 +12677,38 @@ module Api
|
|
12247
12677
|
# unexpected, so discard it and continue.
|
12248
12678
|
if !found
|
12249
12679
|
wire_type = tag & 0x7
|
12680
|
+
|
12681
|
+
unknown_bytes = +"".b
|
12682
|
+
val = tag
|
12683
|
+
while val != 0
|
12684
|
+
byte = val & 0x7F
|
12685
|
+
|
12686
|
+
val >>= 7
|
12687
|
+
# This drops the top bits,
|
12688
|
+
# Otherwise, with a signed right shift,
|
12689
|
+
# we get infinity one bits at the top
|
12690
|
+
val &= (1 << 57) - 1
|
12691
|
+
|
12692
|
+
byte |= 0x80 if val != 0
|
12693
|
+
unknown_bytes << byte
|
12694
|
+
end
|
12695
|
+
|
12250
12696
|
case wire_type
|
12251
12697
|
when 0
|
12252
12698
|
i = 0
|
12253
12699
|
while true
|
12254
12700
|
newbyte = buff.getbyte(index)
|
12255
12701
|
index += 1
|
12256
|
-
break if newbyte.nil?
|
12702
|
+
break if newbyte.nil?
|
12703
|
+
unknown_bytes << newbyte
|
12704
|
+
break if newbyte < 0x80
|
12257
12705
|
i += 1
|
12258
12706
|
break if i > 9
|
12259
12707
|
end
|
12260
12708
|
when 1
|
12709
|
+
unknown_bytes << buff.byteslice(index, 8)
|
12261
12710
|
index += 8
|
12262
12711
|
when 2
|
12263
|
-
## PULL_BYTES
|
12264
12712
|
value =
|
12265
12713
|
if (byte0 = buff.getbyte(index)) < 0x80
|
12266
12714
|
index += 1
|
@@ -12316,15 +12764,29 @@ module Api
|
|
12316
12764
|
raise "integer decoding error"
|
12317
12765
|
end
|
12318
12766
|
|
12319
|
-
|
12320
|
-
|
12767
|
+
val = value
|
12768
|
+
while val != 0
|
12769
|
+
byte = val & 0x7F
|
12770
|
+
|
12771
|
+
val >>= 7
|
12772
|
+
# This drops the top bits,
|
12773
|
+
# Otherwise, with a signed right shift,
|
12774
|
+
# we get infinity one bits at the top
|
12775
|
+
val &= (1 << 57) - 1
|
12321
12776
|
|
12322
|
-
|
12777
|
+
byte |= 0x80 if val != 0
|
12778
|
+
unknown_bytes << byte
|
12779
|
+
end
|
12780
|
+
|
12781
|
+
unknown_bytes << buff.byteslice(index, value)
|
12782
|
+
index += value
|
12323
12783
|
when 5
|
12784
|
+
unknown_bytes << buff.byteslice(index, 4)
|
12324
12785
|
index += 4
|
12325
12786
|
else
|
12326
12787
|
raise "unknown wire type #{wire_type}"
|
12327
12788
|
end
|
12789
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
12328
12790
|
return self if index >= len
|
12329
12791
|
## PULL_UINT64
|
12330
12792
|
tag =
|
@@ -12522,7 +12984,7 @@ module Api
|
|
12522
12984
|
buff << byte
|
12523
12985
|
end
|
12524
12986
|
end
|
12525
|
-
|
12987
|
+
buff << @_unknown_fields if @_unknown_fields
|
12526
12988
|
buff
|
12527
12989
|
end
|
12528
12990
|
|
@@ -12646,20 +13108,38 @@ module Api
|
|
12646
13108
|
# unexpected, so discard it and continue.
|
12647
13109
|
if !found
|
12648
13110
|
wire_type = tag & 0x7
|
13111
|
+
|
13112
|
+
unknown_bytes = +"".b
|
13113
|
+
val = tag
|
13114
|
+
while val != 0
|
13115
|
+
byte = val & 0x7F
|
13116
|
+
|
13117
|
+
val >>= 7
|
13118
|
+
# This drops the top bits,
|
13119
|
+
# Otherwise, with a signed right shift,
|
13120
|
+
# we get infinity one bits at the top
|
13121
|
+
val &= (1 << 57) - 1
|
13122
|
+
|
13123
|
+
byte |= 0x80 if val != 0
|
13124
|
+
unknown_bytes << byte
|
13125
|
+
end
|
13126
|
+
|
12649
13127
|
case wire_type
|
12650
13128
|
when 0
|
12651
13129
|
i = 0
|
12652
13130
|
while true
|
12653
13131
|
newbyte = buff.getbyte(index)
|
12654
13132
|
index += 1
|
12655
|
-
break if newbyte.nil?
|
13133
|
+
break if newbyte.nil?
|
13134
|
+
unknown_bytes << newbyte
|
13135
|
+
break if newbyte < 0x80
|
12656
13136
|
i += 1
|
12657
13137
|
break if i > 9
|
12658
13138
|
end
|
12659
13139
|
when 1
|
13140
|
+
unknown_bytes << buff.byteslice(index, 8)
|
12660
13141
|
index += 8
|
12661
13142
|
when 2
|
12662
|
-
## PULL_BYTES
|
12663
13143
|
value =
|
12664
13144
|
if (byte0 = buff.getbyte(index)) < 0x80
|
12665
13145
|
index += 1
|
@@ -12715,15 +13195,29 @@ module Api
|
|
12715
13195
|
raise "integer decoding error"
|
12716
13196
|
end
|
12717
13197
|
|
12718
|
-
|
12719
|
-
|
13198
|
+
val = value
|
13199
|
+
while val != 0
|
13200
|
+
byte = val & 0x7F
|
13201
|
+
|
13202
|
+
val >>= 7
|
13203
|
+
# This drops the top bits,
|
13204
|
+
# Otherwise, with a signed right shift,
|
13205
|
+
# we get infinity one bits at the top
|
13206
|
+
val &= (1 << 57) - 1
|
13207
|
+
|
13208
|
+
byte |= 0x80 if val != 0
|
13209
|
+
unknown_bytes << byte
|
13210
|
+
end
|
12720
13211
|
|
12721
|
-
|
13212
|
+
unknown_bytes << buff.byteslice(index, value)
|
13213
|
+
index += value
|
12722
13214
|
when 5
|
13215
|
+
unknown_bytes << buff.byteslice(index, 4)
|
12723
13216
|
index += 4
|
12724
13217
|
else
|
12725
13218
|
raise "unknown wire type #{wire_type}"
|
12726
13219
|
end
|
13220
|
+
(@_unknown_fields ||= +"".b) << unknown_bytes
|
12727
13221
|
return self if index >= len
|
12728
13222
|
## PULL_UINT64
|
12729
13223
|
tag =
|
@@ -12921,7 +13415,7 @@ module Api
|
|
12921
13415
|
buff << byte
|
12922
13416
|
end
|
12923
13417
|
end
|
12924
|
-
|
13418
|
+
buff << @_unknown_fields if @_unknown_fields
|
12925
13419
|
buff
|
12926
13420
|
end
|
12927
13421
|
|