ReadByte is analogous to ReadUint8. NOTE: this is *not* an implementation of io.ByteReader.
()
| 958 | // NOTE: this is *not* an implementation |
| 959 | // of io.ByteReader. |
| 960 | func (m *Reader) ReadByte() (b byte, err error) { |
| 961 | var in uint64 |
| 962 | in, err = m.ReadUint64() |
| 963 | if in > math.MaxUint8 { |
| 964 | err = UintOverflow{Value: in, FailedBitsize: 8} |
| 965 | return |
| 966 | } |
| 967 | b = byte(in) |
| 968 | return |
| 969 | } |
| 970 | |
| 971 | // ReadBytes reads a MessagePack 'bin' object |
| 972 | // from the reader and returns its value. It may |