public static void compressRow(OutputStream out, Cell cell, Dictionary dict) throws IOException {
    if (cell instanceof ByteBufferExtendedCell) {
      Dictionary.write(out, ((ByteBufferExtendedCell) cell).getRowByteBuffer(),
        ((ByteBufferExtendedCell) cell).getRowPosition(), cell.getRowLength(), dict);
    } else {
      Dictionary.write(out, cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(), dict);
    }
  }
Compresses the tags to the given outputstream using the TagcompressionContext
@param out                   the outputstream to which the compression should happen
@param cell                  the cell which has tags
@param tagCompressionContext the TagCompressionContext
@throws IOException can throw IOException if the compression encounters issue
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java