MCPcopy Create free account
hub / github.com/bodgit/sevenzip / readCRC

Function readCRC

types.go:189–210  ·  view source on GitHub ↗
(r util.Reader, count uint64)

Source from the content-addressed store, hash-verified

187}
188
189func readCRC(r util.Reader, count uint64) ([]uint32, error) {
190 if err := checkUint64(count, true); err != nil {
191 return nil, err
192 }
193
194 defined, err := readOptionalBool(r, count)
195 if err != nil {
196 return nil, err
197 }
198
199 crcs := make([]uint32, count)
200
201 for i := range defined {
202 if defined[i] {
203 if err := binary.Read(r, binary.LittleEndian, &crcs[i]); err != nil {
204 return nil, fmt.Errorf("readCRC: Read error: %w", err)
205 }
206 }
207 }
208
209 return crcs, nil
210}
211
212//nolint:cyclop
213func readPackInfo(r util.Reader) (*packInfo, error) {

Callers 3

readPackInfoFunction · 0.85
readUnpackInfoFunction · 0.85
readSubStreamsInfoFunction · 0.85

Calls 3

checkUint64Function · 0.85
readOptionalBoolFunction · 0.85
ReadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…