public static RegexStringComparator parseFrom(final byte[] pbBytes)
    throws DeserializationException {
    ComparatorProtos.RegexStringComparator proto;
    try {
      proto = ComparatorProtos.RegexStringComparator.parseFrom(pbBytes);
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
    RegexStringComparator comparator;
    if (proto.hasEngine()) {
      EngineType engine = EngineType.valueOf(proto.getEngine());
      comparator = new RegexStringComparator(proto.getPattern(), proto.getPatternFlags(), engine);
    } else {
      comparator = new RegexStringComparator(proto.getPattern(), proto.getPatternFlags());
    }
    String charset = proto.getCharset();
    if (charset.length() > 0) {
      try {
        comparator.getEngine().setCharset(charset);
      } catch (IllegalCharsetNameException e) {
        LOG.error("invalid charset", e);
      }
    }
    return comparator;
  }
Parse a serialized representation of {@link RegexStringComparator}
@param pbBytes A pb serialized {@link RegexStringComparator} instance
@return An instance of {@link RegexStringComparator} made from <code>bytes</code>
@throws DeserializationException if an error occurred
@see #toByteArray
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java