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

Method ReadCrc32UIntAndCheck

util/crc32.go:96–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94}
95
96func (cr *Crc32Reader) ReadCrc32UIntAndCheck() (err error) {
97 _, err = io.CopyN(ioutil.Discard, cr, 4)
98 if err != nil {
99 return err
100 }
101
102 if cr.Crc32 != 0 {
103 err = fmt.Errorf("crc32(%x) != 0", cr.Crc32)
104 return err
105 }
106
107 return nil
108}
109
110func (wr *Crc32Writer) Write(b []byte) (n int, err error) {
111 if n, err = wr.W.Write(b); err != nil {

Callers 2

ReadPMTFunction · 0.80
ReadPATFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected