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

Method folderOffset

struct.go:246–258  ·  view source on GitHub ↗
(folder int)

Source from the content-addressed store, hash-verified

244}
245
246func (si *streamsInfo) folderOffset(folder int) int64 {
247 offset := uint64(0)
248
249 for i, k := 0, uint64(0); i < folder; i++ {
250 for j := k; j < k+si.unpackInfo.folder[i].packedStreams; j++ {
251 offset += si.packInfo.size[j]
252 }
253
254 k += si.unpackInfo.folder[i].packedStreams
255 }
256
257 return int64(si.packInfo.position + offset) //nolint:gosec
258}
259
260//nolint:cyclop,funlen,lll
261func (si *streamsInfo) folderReader(r io.ReaderAt, folder int, password string) (*folderReadCloser, uint32, bool, error) {

Callers 1

folderReaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected