| 244 | } |
| 245 | |
| 246 | func (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 |
| 261 | func (si *streamsInfo) folderReader(r io.ReaderAt, folder int, password string) (*folderReadCloser, uint32, bool, error) { |