public int uncompressTags(ByteBuff src, byte[] dest, int offset, int length) throws IOException {
    int srcBeginPos = src.position();
    int endOffset = offset + length;
    while (offset < endOffset) {
      byte status = src.get();
      int tagLen;
      if (status == Dictionary.NOT_IN_DICTIONARY) {
        tagLen = StreamUtils.readRawVarint32(src);
        offset = Bytes.putAsShort(dest, offset, tagLen);
        src.get(dest, offset, tagLen);
        tagDict.addEntry(dest, offset, tagLen);
        offset += tagLen;
      } else {
        short dictIdx = StreamUtils.toShort(status, src.get());
        byte[] entry = tagDict.getEntry(dictIdx);
        if (entry == null) {
          throw new IOException("Missing dictionary entry for index " + dictIdx);
        }
        tagLen = entry.length;
        offset = Bytes.putAsShort(dest, offset, tagLen);
        System.arraycopy(entry, 0, dest, offset, tagLen);
        offset += tagLen;
      }
    }
    return src.position() - srcBeginPos;
  }
Uncompress tags from the input ByteBuffer and writes to the destination array.
@param src    Buffer where the compressed tags are available
@param dest   Destination array where to write the uncompressed tags
@param offset Offset in destination where tags to be written
@param length Length of all tag bytes
@return bytes count read from source to uncompress all tags.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/TagCompressionContext.java