MCPcopy Create free account
hub / github.com/DNAProject/DNA / NextByte

Method NextByte

common/zero_copy_source.go:83–91  ·  view source on GitHub ↗

ReadByte implements the io.ByteReader interface.

()

Source from the content-addressed store, hash-verified

81
82// ReadByte implements the io.ByteReader interface.
83func (self *ZeroCopySource) NextByte() (data byte, eof bool) {
84 if self.off >= uint64(len(self.s)) {
85 return 0, true
86 }
87
88 b := self.s[self.off]
89 self.off++
90 return b, false
91}
92
93func (self *ZeroCopySource) NextUint8() (data uint8, eof bool) {
94 var val byte

Callers 15

BenchmarkZeroCopySourceFunction · 0.95
NextUint8Method · 0.95
NextBoolMethod · 0.95
NextVarUintMethod · 0.95
TestSourceSinkFunction · 0.95
DeserializationMethod · 0.80
DeserializationMethod · 0.80
ReadOpCodeMethod · 0.80
DeserializationMethod · 0.80
DeserializationMethod · 0.80
deserializeMethod · 0.80

Calls

no outgoing calls

Tested by 2

BenchmarkZeroCopySourceFunction · 0.76
TestSourceSinkFunction · 0.76