MCPcopy Index your code
hub / github.com/tinylib/msgp / ReadInt8Bytes

Function ReadInt8Bytes

msgp/read_bytes.go:566–572  ·  view source on GitHub ↗

ReadInt8Bytes tries to read an int16 from 'b' and return the value and the remaining bytes. Possible errors: - [ErrShortBytes] (too few bytes) - [TypeError] (not a int) - [IntOverflow] (value doesn't fit in int8)

(b []byte)

Source from the content-addressed store, hash-verified

564// - [TypeError] (not a int)
565// - [IntOverflow] (value doesn't fit in int8)
566func ReadInt8Bytes(b []byte) (int8, []byte, error) {
567 i, o, err := ReadInt64Bytes(b)
568 if i > math.MaxInt8 || i < math.MinInt8 {
569 return 0, o, IntOverflow{Value: i, FailedBitsize: 8}
570 }
571 return int8(i), o, err
572}
573
574// ReadIntBytes tries to read an int
575// from 'b' and return the value and the remaining bytes.

Callers 4

UnmarshalMsgMethod · 0.92
UnmarshalMsgMethod · 0.92
FuzzReadBytesFunction · 0.85

Calls 1

ReadInt64BytesFunction · 0.85

Tested by 2

FuzzReadBytesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…