UnsafeReadVarint32 reads a varint32 without bounds checking. Caller must ensure remaining() >= 5 before calling.
(err *Error)
| 1288 | // UnsafeReadVarint32 reads a varint32 without bounds checking. |
| 1289 | // Caller must ensure remaining() >= 5 before calling. |
| 1290 | func (b *ByteBuffer) UnsafeReadVarint32(err *Error) int32 { |
| 1291 | u := b.readVarUint32Fast(err) |
| 1292 | v := int32(u >> 1) |
| 1293 | if u&1 != 0 { |
| 1294 | v = ^v |
| 1295 | } |
| 1296 | return v |
| 1297 | } |
| 1298 | |
| 1299 | // UnsafeReadVarint64 reads a varint64 without bounds checking. |
| 1300 | // Caller must ensure remaining() >= 10 before calling. |
no test coverage detected