MCPcopy Create free account
hub / github.com/Monibuca/engine / ReadByteToUint8

Function ReadByteToUint8

util/convert.go:107–114  ·  view source on GitHub ↗
(r io.Reader)

Source from the content-addressed store, hash-verified

105}
106
107func ReadByteToUint8(r io.Reader) (data uint8, err error) {
108 bb := make([]byte, 1)
109 if _, err := io.ReadFull(r, bb); err != nil {
110 return 0, err
111 }
112
113 return uint8(bb[0]), nil
114}
115
116func ReadByteToUint16(r io.Reader, bigEndian bool) (data uint16, err error) {
117 bb := make([]byte, 2)

Callers 5

ReadPMTFunction · 0.92
ReadPMTDescriptorFunction · 0.92
ReadPSIFunction · 0.92
ReadPESHeaderFunction · 0.92
ReadTsHeaderFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected