A Decoder keeps track of all information needed to check the integrity of a set of data files, and possibly repair any missing/corrupt data files from the parity files (that usually end in .par2).
| 158 | // missing/corrupt data files from the parity files (that usually end |
| 159 | // in .par2). |
| 160 | type Decoder struct { |
| 161 | fileIO fileIO |
| 162 | delegate DecoderDelegate |
| 163 | |
| 164 | indexPath string |
| 165 | |
| 166 | setID recoverySetID |
| 167 | clientID string |
| 168 | sliceByteCount int |
| 169 | recoverySet []decoderInputFileInfo |
| 170 | nonRecoverySet []decoderInputFileInfo |
| 171 | |
| 172 | numGoroutines int |
| 173 | |
| 174 | checksumToLocation checksumShardLocationMap |
| 175 | |
| 176 | // Indexed the same as recoverySet. |
| 177 | fileIntegrityInfos []fileIntegrityInfo |
| 178 | |
| 179 | parityShards [][]byte |
| 180 | } |
| 181 | |
| 182 | // DecoderDelegate holds methods that are called during the decode |
| 183 | // process. |
nothing calls this directly
no outgoing calls
no test coverage detected