public static List<Tag> asList(byte[] b, int offset, int length) {
    List<Tag> tags = new ArrayList<>();
    int pos = offset;
    while (pos < offset + length) {
      int tagLen = Bytes.readAsInt(b, pos, Tag.TAG_LENGTH_SIZE);
      tags.add(new ArrayBackedTag(b, pos, tagLen + Tag.TAG_LENGTH_SIZE));
      pos += Tag.TAG_LENGTH_SIZE + tagLen;
    }
    return tags;
  }
Creates list of tags from given byte array, expected that it is in the expected tag format.
@param b      The byte array
@param offset The offset in array where tag bytes begin
@param length Total length of all tags bytes
@return List of tags
hbase-common/src/main/java/org/apache/hadoop/hbase/TagUtil.java