MCPcopy Index your code
hub / github.com/MatrixTM/MHDDoS / varint

Method varint

start.py:354–362  ·  view source on GitHub ↗
(d: int)

Source from the content-addressed store, hash-verified

352class Minecraft:
353 @staticmethod
354 def varint(d: int) -> bytes:
355 o = b''
356 while True:
357 b = d & 0x7F
358 d >>= 7
359 o += data_pack("B", b | (0x80 if d > 0 else 0))
360 if d == 0:
361 break
362 return o
363
364 @staticmethod
365 def data(*payload: bytes) -> bytes:

Callers 6

dataMethod · 0.80
handshakeMethod · 0.80
handshake_forwardedMethod · 0.80
loginMethod · 0.80
keepaliveMethod · 0.80
chatMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected