MCPcopy Create free account
hub / github.com/apache/fory / UnsafeReadVarint64

Method UnsafeReadVarint64

go/fory/buffer.go:1301–1308  ·  view source on GitHub ↗

UnsafeReadVarint64 reads a varint64 without bounds checking. Caller must ensure remaining() >= 10 before calling.

()

Source from the content-addressed store, hash-verified

1299// UnsafeReadVarint64 reads a varint64 without bounds checking.
1300// Caller must ensure remaining() >= 10 before calling.
1301func (b *ByteBuffer) UnsafeReadVarint64() int64 {
1302 u := b.readVarUint64Fast()
1303 v := int64(u >> 1)
1304 if u&1 != 0 {
1305 v = ^v
1306 }
1307 return v
1308}
1309
1310// UnsafeReadVarUint32 reads a VarUint32 without bounds checking.
1311// Caller must ensure remaining() >= 5 before calling.

Callers 2

ReadDataMethod · 0.80

Calls 2

readVarUint64FastMethod · 0.95
int64Function · 0.50

Tested by

no test coverage detected