code: public static Counters fromEscapedCompactString(String compactString) 
    throws ParseException {
      Counters counters = new Counters();
      IntWritable index = new IntWritable(0);
      
      // Get the group to work on
      String groupString = 
        getBlock(compactString, GROUP_OPEN, GROUP_CLOSE, index);
      
      while (groupString != null) {
        IntWritable groupIndex = new IntWritable(0);
        
        // Get the actual name
        String groupName = 
          getBlock(groupString, UNIT_OPEN, UNIT_CLOSE, groupIndex);
        groupName = unescape(groupName);
        
        // Get the display name
        String groupDisplayName = 
          getBlock(groupString, UNIT_OPEN, UNIT_CLOSE, groupIndex);
        groupDisplayName = unescape(groupDisplayName);
        
        // Get the counters
        Group group = counters.getGroup(groupName);
        group.setDisplayName(groupDisplayName);
        
        String counterString = 
          getBlock(groupString, COUNTER_OPEN, COUNTER_CLOSE, groupIndex);
        
        while (counterString != null) {
          IntWritable counterIndex = new IntWritable(0);
          
          // Get the actual name
          String counterName = 
            getBlock(counterString, UNIT_OPEN, UNIT_CLOSE, counterIndex);
          counterName = unescape(counterName);
          
          // Get the display name
          String counterDisplayName = 
            getBlock(counterString, UNIT_OPEN, UNIT_CLOSE, counterIndex);
          counterDisplayName = unescape(counterDisplayName);
          
          // Get the value
          long value = 
            Long.parseLong(getBlock(counterString, UNIT_OPEN, UNIT_CLOSE, 
                                    counterIndex));
          
          // Add the counter
          Counter counter = group.getCounterForName(counterName);
          counter.setDisplayName(counterDisplayName);
          counter.increment(value);
          
          // Get the next counter
          counterString = 
            getBlock(groupString, COUNTER_OPEN, COUNTER_CLOSE, groupIndex);
        }
        
        groupString = getBlock(compactString, GROUP_OPEN, GROUP_CLOSE, index);
      }
      return counters;
    }
docs: Convert a stringified counter representation into a counter object. Note
  that the counter can be recovered if its stringified using
  {@link #makeEscapedCompactString()}.
  @return a Counter