MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / ReadFrom

Method ReadFrom

utils/binary/builder.go:124–129  ·  view source on GitHub ↗

ReadFrom for impl. io.ReaderFrom

(r io.Reader)

Source from the content-addressed store, hash-verified

122
123// ReadFrom for impl. io.ReaderFrom
124func (b *Builder) ReadFrom(r io.Reader) (n int64, err error) {
125 b.p(func(ub *pbuf.UserBuffer[teacfg]) {
126 n, err = io.Copy(ub, r)
127 })
128 return
129}
130
131func (b *Builder) WriteLenBytes(v []byte) *Builder {
132 b.WriteU16(uint16(len(v)))

Callers 2

ZlibUncompressFunction · 0.80
GZipUncompressFunction · 0.80

Calls 1

pMethod · 0.95

Tested by

no test coverage detected