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

Method Read

util/crc32.go:86–94  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

84}
85
86func (cr *Crc32Reader) Read(b []byte) (n int, err error) {
87 if n, err = cr.R.Read(b); err != nil {
88 return
89 }
90
91 cr.Crc32 = getCrc32(cr.Crc32, b)
92
93 return
94}
95
96func (cr *Crc32Reader) ReadCrc32UIntAndCheck() (err error) {
97 _, err = io.CopyN(ioutil.Discard, cr, 4)

Callers

nothing calls this directly

Calls 2

getCrc32Function · 0.85
ReadMethod · 0.65

Tested by

no test coverage detected