(file int)
| 211 | } |
| 212 | |
| 213 | func (si *streamsInfo) FileFolderAndSize(file int) (int, uint64, uint32) { |
| 214 | var ( |
| 215 | folder int |
| 216 | streams uint64 = 1 |
| 217 | crc uint32 |
| 218 | ) |
| 219 | |
| 220 | if si.subStreamsInfo != nil { |
| 221 | total := uint64(0) |
| 222 | |
| 223 | for folder, streams = range si.subStreamsInfo.streams { |
| 224 | total += streams |
| 225 | if uint64(file) < total { //nolint:gosec |
| 226 | break |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | if len(si.subStreamsInfo.digest) > 0 { |
| 231 | crc = si.subStreamsInfo.digest[file] |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | if streams == 1 { |
| 236 | if len(si.unpackInfo.digest) > 0 { |
| 237 | crc = si.unpackInfo.digest[folder] |
| 238 | } |
| 239 | |
| 240 | return folder, si.unpackInfo.folder[folder].size[len(si.unpackInfo.folder[folder].coder)-1], crc |
| 241 | } |
| 242 | |
| 243 | return folder, si.subStreamsInfo.size[file], crc |
| 244 | } |
| 245 | |
| 246 | func (si *streamsInfo) folderOffset(folder int) int64 { |
| 247 | offset := uint64(0) |
no outgoing calls
no test coverage detected