public static Decoder createDecoder(int encoding, CMsgReader reader) {
/*
    if (encoding <= Encodings.encodingMax && createFns[encoding])
      return (createFns[encoding])(reader);
    return 0;
*/
    switch(encoding) {
      case Encodings.encodingRaw:     return new RawDecoder(reader);
      case Encodings.encodingRRE:     return new RREDecoder(reader);
      case Encodings.encodingHextile: return new HextileDecoder(reader);
      case Encodings.encodingTight:   return new TightDecoder(reader);
      case Encodings.encodingZRLE:    return new ZRLEDecoder(reader);
    }
    return null;
  }