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

Method VarInt

protocol/net/io/encoding/writer.go:108–119  ·  view source on GitHub ↗
(value int32)

Source from the content-addressed store, hash-verified

106}
107
108func (w Writer) VarInt(value int32) error {
109 ux := uint32(value)
110 for ux >= 0x80 {
111 if err := w.Ubyte(byte(ux&0x7F) | 0x80); err != nil {
112 return err
113 }
114
115 ux >>= 7
116 }
117
118 return w.Ubyte(byte(ux))
119}
120
121func (w Writer) VarLong(value int64) error {
122 var (

Callers 6

wpkMethod · 0.95
StringMethod · 0.95
IdentifierMethod · 0.95
BitSetMethod · 0.95
ByteArrayMethod · 0.95
EncodeBufMethod · 0.95

Calls 1

UbyteMethod · 0.95

Tested by

no test coverage detected