BaseXDecoder constructor

BaseXDecoder(
  1. String alphabet
)

Implementation

BaseXDecoder(this.alphabet) {
  _baseMap.fillRange(0, _baseMap.length, 255);
  for (var i = 0; i < alphabet.length; i++) {
    var xc = alphabet.codeUnitAt(i);
    if (_baseMap[xc] != 255) {
      throw FormatException('${alphabet[i]} is ambiguous');
    }
    _baseMap[xc] = i;
  }
}