| 48 | } |
| 49 | |
| 50 | func shouldUseATable(nextRunes []rune, curEncoding byte) bool { |
| 51 | nextRune := nextRunes[0] |
| 52 | if !tableContainsRune(bTable, nextRune) || curEncoding == startASymbol { |
| 53 | return tableContainsRune(aTable, nextRune) |
| 54 | } |
| 55 | if curEncoding == 0 { |
| 56 | for _, r := range nextRunes { |
| 57 | if tableContainsRune(abTable, r) { |
| 58 | continue |
| 59 | } |
| 60 | if strings.ContainsRune(aOnlyTable, r) { |
| 61 | return true |
| 62 | } |
| 63 | break |
| 64 | } |
| 65 | } |
| 66 | return false |
| 67 | } |
| 68 | |
| 69 | func getCodeIndexList(content []rune) *utils.BitList { |
| 70 | result := new(utils.BitList) |