public void uncompressTags(InputStream src, byte[] dest, int offset, int length)
    throws IOException {
    int endOffset = offset + length;
    while (offset < endOffset) {
      byte status = StreamUtils.readByte(src);
      if (status == Dictionary.NOT_IN_DICTIONARY) {
        int tagLen = StreamUtils.readRawVarint32(src);
        offset = Bytes.putAsShort(dest, offset, tagLen);
        IOUtils.readFully(src, dest, offset, tagLen);
        tagDict.addEntry(dest, offset, tagLen);
        offset += tagLen;
      } else {
        short dictIdx = StreamUtils.toShort(status, StreamUtils.readByte(src));
        byte[] entry = tagDict.getEntry(dictIdx);
        if (entry == null) {
          throw new IOException("Missing dictionary entry for index " + dictIdx);
        }
        offset = Bytes.putAsShort(dest, offset, entry.length);
        System.arraycopy(entry, 0, dest, offset, entry.length);
        offset += entry.length;
      }
    }
  }
Uncompress tags from the InputStream and writes to the destination array.
@param src    Stream 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
hbase-common/src/main/java/org/apache/hadoop/hbase/io/TagCompressionContext.java