public static void compressTags(OutputStream out, ExtendedCell cell,
    TagCompressionContext tagCompressionContext) throws IOException {
    if (cell instanceof ByteBufferExtendedCell) {
      tagCompressionContext.compressTags(out, ((ByteBufferExtendedCell) cell).getTagsByteBuffer(),
        ((ByteBufferExtendedCell) cell).getTagsPosition(), cell.getTagsLength());
    } else {
      tagCompressionContext.compressTags(out, cell.getTagsArray(), cell.getTagsOffset(),
        cell.getTagsLength());
    }
  }
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