| 102 | } |
| 103 | |
| 104 | func (d *Decoder) decodeRepAllToLowerSpecial(data []byte, algorithm Encoding) ([]byte, error) { |
| 105 | // Decode the data to the lowercase letters, then convert |
| 106 | str, err := d.decodeGeneric(data, algorithm) |
| 107 | if err != nil { |
| 108 | return nil, err |
| 109 | } |
| 110 | chars := make([]byte, len(str)) |
| 111 | j := 0 |
| 112 | for i := 0; i < len(str); i++ { |
| 113 | if str[i] == '|' { |
| 114 | chars[j] = str[i+1] - 'a' + 'A' |
| 115 | i++ |
| 116 | } else { |
| 117 | chars[j] = str[i] |
| 118 | } |
| 119 | j++ |
| 120 | } |
| 121 | return chars[0:j], nil |
| 122 | } |
| 123 | |
| 124 | /** Decoding char for two encoding algorithms */ |
| 125 | func (d *Decoder) decodeChar(val byte, encoding Encoding) (byte, error) { |