+ //we got more than 64 good bits and not all errors
+ if ((bitnum > (64+errCnt)) && (errCnt<(GraphTraceLen/1000))) {
+ //possible good read
+ if (errCnt==0) break; //great read - finish
+ if (bestStart = iii) break; //if current run == bestErrCnt run (after exhausted testing) then finish
+ if (errCnt<bestErrCnt){ //set this as new best run
+ bestErrCnt=errCnt;
+ bestStart = iii;
+ }
+ }
+ }
+ if (iii>=gLen){ //exhausted test
+ //if there was a ok test go back to that one and re-run the best run (then dump after that run)
+ if (bestErrCnt < (GraphTraceLen/1000)) iii=bestStart;
+ }