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

Method Skip

common/zero_copy_source.go:70–80  ·  view source on GitHub ↗
(n uint64)

Source from the content-addressed store, hash-verified

68}
69
70func (self *ZeroCopySource) Skip(n uint64) (eof bool) {
71 m := uint64(len(self.s))
72 end, overflow := SafeAdd(self.off, n)
73 if overflow || end > m {
74 end = m
75 eof = true
76 }
77 self.off = end
78
79 return
80}
81
82// ReadByte implements the io.ByteReader interface.
83func (self *ZeroCopySource) NextByte() (data byte, eof bool) {

Callers 1

Calls 1

SafeAddFunction · 0.85

Tested by

no test coverage detected