MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / AppendVarInt

Function AppendVarInt

protocol/net/io/encoding/encoding.go:34–41  ·  view source on GitHub ↗
(data []byte, value int32)

Source from the content-addressed store, hash-verified

32}
33
34func AppendVarInt(data []byte, value int32) []byte {
35 ux := uint32(value)
36 for ux >= 0x80 {
37 data = append(data, byte(ux&0x7F)|0x80)
38 ux >>= 7
39 }
40 return append(data, byte(ux))
41}
42
43func PutVarInt(data []byte, value int32) (n int) {
44 ux := uint32(value)

Callers 1

AppendStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected