UnsafeReadVarint64 reads a varint64 without bounds checking. Caller must ensure remaining() >= 10 before calling.
()
| 1299 | // UnsafeReadVarint64 reads a varint64 without bounds checking. |
| 1300 | // Caller must ensure remaining() >= 10 before calling. |
| 1301 | func (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. |
no test coverage detected